Skip to content

Commit

Permalink
Merge pull request #6 from nens/feedback_daan
Browse files Browse the repository at this point in the history
Feedback daan
  • Loading branch information
JJFlorian authored Mar 19, 2024
2 parents c170fc6 + 33e475a commit 3097d65
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions api/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.contrib.auth import logout
from django.http import HttpResponseRedirect
from django.shortcuts import redirect
from django.urls import reverse
from django_filters.rest_framework import DjangoFilterBackend
Expand Down Expand Up @@ -137,12 +138,7 @@ def post(self, request):
)
full_url = request.build_absolute_uri(url)

return Response(
{
"message": f"Succesfully received the import taks request. Check {full_url} for the status of the import task."
},
status=status.HTTP_201_CREATED,
)
return HttpResponseRedirect(full_url)

return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)

Expand Down Expand Up @@ -244,12 +240,7 @@ def post(self, request):
)
full_url = request.build_absolute_uri(url)

return Response(
{
"message": f"Succesfully received the upload taks request. Check {full_url} for the status of the import task."
},
status=status.HTTP_201_CREATED,
)
return HttpResponseRedirect(full_url)

return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)

Expand Down

0 comments on commit 3097d65

Please sign in to comment.