Commit d6b5bba0 authored by Rafal's avatar Rafal

add permision to all

parent e4ac6442
......@@ -20,6 +20,10 @@ class DiscussionViewSet(viewsets.ModelViewSet):
def add(self, request, pk=None):
discussion = get_object_or_404(self.queryset, pk=pk)
text = request.data.get('text')
print "XD"
print text
print request.data.GET
print request.data.POST
user = request.user
discussion.add_message(text=text, user=user)
return Response(status=rest_framework.status.HTTP_200_OK)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment