Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
deigil committed Apr 16, 2024
2 parents 23ed72e + 9009f25 commit 653eb75
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ jobs:
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
stop_script: cd /home/ubuntu/djangobackend && ./checks.sh
<<<<<<< HEAD
=======

>>>>>>> 9009f25d3f4c79f0d5f5a2f96798a07c213ccda1
21 changes: 4 additions & 17 deletions database/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,9 @@ def post(self, request):
existing_link.clicked_count += 1
existing_link.timeAccessed = data['timeAccessed']

link = {
"domainURL": updatedLink.domainURL,
"domainTitle": updatedLink.domainTitle,
"timeAccessed": updatedLink.timeAccessed,
"domainRating": updatedLink.domainRating,
"reasonNoHttps": updatedLink.reasonNoHttps,
"reasonShortened": updatedLink.reasonShortened,
"reasonAtSymbol": updatedLink.reasonAtSymbol,
"reasonBadExtension": updatedLink.reasonBadExtension,
"reasonRedirect": updatedLink.reasonRedirect,
"reasonDashes": updatedLink.reasonDashes,
"clicked_count": updatedLink.clicked_count
}
# Serialize the existing link data
serializer = LinkSerializer(existing_link)
return Response(serializer.data, status=200)

# linkToBeSent = json.loads(link.body)
# print(linkToBeSent)
Expand All @@ -95,7 +85,4 @@ def post(self, request):
)
link.save()

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

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

0 comments on commit 653eb75

Please sign in to comment.