diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2021-12-12 23:22:13 +0100 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2021-12-12 23:22:13 +0100 |
commit | e7f4bd9cc60aa3ad230b31c3918df1f2043d6942 (patch) | |
tree | 17a99bdffed70ccd156cff935c0851276dc5a01f /chat_api | |
parent | ff53fd490b02536733f6618908760b9e3d52eeb3 (diff) | |
download | lom_api-e7f4bd9cc60aa3ad230b31c3918df1f2043d6942.tar.gz lom_api-e7f4bd9cc60aa3ad230b31c3918df1f2043d6942.zip |
add grups views and modify info auth view
Diffstat (limited to 'chat_api')
-rw-r--r-- | chat_api/models.py | 2 | ||||
-rw-r--r-- | chat_api/views.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/chat_api/models.py b/chat_api/models.py index 4c370fc..4b354f4 100644 --- a/chat_api/models.py +++ b/chat_api/models.py | |||
@@ -24,4 +24,4 @@ class Gm(models.Model): | |||
24 | create_date = models.DateTimeField(auto_now=True) | 24 | create_date = models.DateTimeField(auto_now=True) |
25 | 25 | ||
26 | def __str__(self): | 26 | def __str__(self): |
27 | return str(self.sender) \ No newline at end of file | 27 | return str(self.sender) |
diff --git a/chat_api/views.py b/chat_api/views.py index 6d161c1..3ea0e54 100644 --- a/chat_api/views.py +++ b/chat_api/views.py | |||
@@ -63,6 +63,7 @@ class GroupDetailView(generics.RetrieveUpdateDestroyAPIView): | |||
63 | def update(self, request, *args, **kwargs): | 63 | def update(self, request, *args, **kwargs): |
64 | request.data['owner'] = request.user.pk | 64 | request.data['owner'] = request.user.pk |
65 | set_users(request) | 65 | set_users(request) |
66 | |||
66 | return super().update(request, *args, **kwargs) | 67 | return super().update(request, *args, **kwargs) |
67 | 68 | ||
68 | def retrieve(self, request, pk): | 69 | def retrieve(self, request, pk): |
@@ -112,4 +113,4 @@ class GmsView(APIView): | |||
112 | serializer.is_valid(raise_exception=True) | 113 | serializer.is_valid(raise_exception=True) |
113 | serializer.save() | 114 | serializer.save() |
114 | 115 | ||
115 | return Response(serializer.data) \ No newline at end of file | 116 | return Response(serializer.data) |