def post(self, request, pk):
try:
request.user.notifications.get(pk=pk).mark_as_read()
return Response(status=status.HTTP_200_OK)
except Exception as e:
print(repr(e))
return Response(status=status.HTTP_400_BAD_REQUEST)
文章目录