Skip to content

Commit

Permalink
changed status_code in lines 170,174,213, 215 to 200_OK
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooria Toof authored and Pooria Toof committed Aug 23, 2024
1 parent 82eecc6 commit 0019584
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Backend/token_service/token_service/token_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ def validate_token(self, access_token) -> bool:

def validate_token_for_user(self, request, *args, **kwargs):
response_message = {}
status_code = status.HTTP_201_CREATED
status_code = status.HTTP_200_OK
isfrontend = request.data.get("is_frontend")
if isfrontend is None:
response_message, status_code = check_secret(request, response_message, status_code)
if "error" not in response_message and status_code == status.HTTP_201_CREATED:
if "error" not in response_message and status_code == status.HTTP_200_OK:
try:
status_code = status.HTTP_200_OK
response_message = {}
Expand Down Expand Up @@ -210,9 +210,9 @@ def validate_token_for_user(self, request, *args, **kwargs):
class InvalidateToken(viewsets.ViewSet):
def invalidate_token_for_user(self, request, *args, **kwargs) -> Response:
response_message = {}
status_code = status.HTTP_201_CREATED
status_code = status.HTTP_200_OK
response_message, status_code = check_secret(request, response_message, status_code)
if "error" not in response_message and status_code == status.HTTP_201_CREATED:
if "error" not in response_message and status_code == status.HTTP_200_OK:
try:
access = request.data.get("access")
id = request.data.get("id")
Expand Down

0 comments on commit 0019584

Please sign in to comment.