diff --git a/hb_server/apps/hrm/services.py b/hb_server/apps/hrm/services.py index 60c8023..eca4639 100644 --- a/hb_server/apps/hrm/services.py +++ b/hb_server/apps/hrm/services.py @@ -36,7 +36,7 @@ class HRMService: # 识别成功 user = User.objects.get(id=face_users[index]) return user, '' - return None, '人脸未匹配' + return None, '人脸未匹配,请调整位置' @classmethod def get_facedata_from_img(cls, img_path): diff --git a/hb_server/apps/hrm/views.py b/hb_server/apps/hrm/views.py index 575f324..c9121b0 100644 --- a/hb_server/apps/hrm/views.py +++ b/hb_server/apps/hrm/views.py @@ -183,6 +183,7 @@ class FaceLogin(CreateAPIView): return Response({ 'refresh': str(refresh), 'access': str(refresh.access_token), - 'username':user.username + 'username':user.username, + 'name':user.name }) return Response(msg, status=status.HTTP_400_BAD_REQUEST) \ No newline at end of file