Fix login issue
This commit is contained in:
@ -908,11 +908,14 @@ class LoginAPI(generics.GenericAPIView):
|
||||
def post(self, request, *args, **kwargs):
|
||||
logger.info(f"Login attempt for identifier: {request.data.get('identifier', 'identifier not provided')}")
|
||||
logger.debug(f"Request data: {request.data}")
|
||||
logger.debug(f"Request headers: {dict(request.headers)}")
|
||||
|
||||
# フロントエンドの 'identifier' フィールドを 'email' にマッピング
|
||||
data = request.data.copy()
|
||||
if 'identifier' in data and 'email' not in data:
|
||||
data['email'] = data['identifier']
|
||||
|
||||
logger.debug(f"Processed data: {data}")
|
||||
|
||||
serializer = self.get_serializer(data=data)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user