From d5d73e8696bd21c5bcd3b258d74b64a54f9789bc Mon Sep 17 00:00:00 2001 From: Horilla Date: Mon, 5 May 2025 12:20:23 +0530 Subject: [PATCH] [ADD] HORILLA API: company_id to login api --- horilla_api/api_views/auth/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/horilla_api/api_views/auth/views.py b/horilla_api/api_views/auth/views.py index e09246857..997a46ca5 100644 --- a/horilla_api/api_views/auth/views.py +++ b/horilla_api/api_views/auth/views.py @@ -30,12 +30,17 @@ class LoginAPIView(APIView): face_detection_image = employee.face_detection.image.url except: pass + try: + company_id = employee.get_company().id + except: + pass result = { "employee": GetEmployeeSerializer(employee).data, "access": str(refresh.access_token), "face_detection": face_detection, "face_detection_image": face_detection_image, "geo_fencing": geo_fencing, + "company_id": company_id, } return Response(result, status=200) else: