player ID delete api 2
This commit is contained in:
@@ -114,10 +114,8 @@ class DeletePlayerID(APIView):
|
||||
|
||||
def post(self, request):
|
||||
try:
|
||||
if hasattr(request.user, "player_id"):
|
||||
request.user.player_id = (
|
||||
None # or use a dedicated method to delete the player ID
|
||||
)
|
||||
if request.user.player_id:
|
||||
del request.user.player_id
|
||||
return ApiResponse.success(
|
||||
message=constants.SUCCESS,
|
||||
data="Player ID Deleted Successfully!",
|
||||
|
||||
Reference in New Issue
Block a user