feat: introduce public_id UUID field for user identification in URLs and APIs

This commit is contained in:
Your Name
2026-04-10 17:11:43 +05:30
parent 8c836fdac6
commit 083936d036
6 changed files with 47 additions and 3 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ class ActivationView(generics.GenericAPIView):
def get(self, request, uidb64, token):
try:
uid = urlsafe_base64_decode(uidb64).decode()
user = User.objects.get(pk=uid)
user = User.objects.get(public_id=uid)
except (User.DoesNotExist, TypeError, ValueError):
return Response({"detail": "Invalid activation link: User Error"}, status=status.HTTP_400_BAD_REQUEST)
# validate token