Skip to content

Commit

Permalink
Sam test (#9)
Browse files Browse the repository at this point in the history
* front end was the issue, retrying sending w/ POST

* trying to fix response now
  • Loading branch information
karson94 authored Apr 16, 2024
1 parent 151f551 commit 355958c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions database/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ def post(self, request):
"clicked_count": updatedLink.clicked_count
}

existing_link.save()

# return Response(link, status=201)
linkToBeSent = json.loads(link.body)
print(linkToBeSent)

existing_link.save()



else:
# If no entry exists, create a new one
link = updatedLink(
Expand All @@ -93,5 +95,7 @@ def post(self, request):
)
link.save()

# return Response({"message": "Link added successfully"}, status=201)

# Return success response
return Response({"message": "Link added successfully"}, status=201)
return Response(link, status=201)

0 comments on commit 355958c

Please sign in to comment.