From 39a839c43c0d9df0996ab4efe13efe56c949c6c4 Mon Sep 17 00:00:00 2001 From: berkay Date: Wed, 1 Jan 2025 14:11:21 +0300 Subject: [PATCH] endpoint_restriction_available updated --- api_configs/configs.py | 2 +- service_app/routers/rules/router.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api_configs/configs.py b/api_configs/configs.py index 56d1436..8f74202 100644 --- a/api_configs/configs.py +++ b/api_configs/configs.py @@ -33,7 +33,7 @@ class Config: ] NOT_SECURE_PATHS = [ "/access/endpoints/available", - "/access/endpoint/available" + "/access/endpoint/available", "/validations/endpoint", "/authentication/avatar", ] diff --git a/service_app/routers/rules/router.py b/service_app/routers/rules/router.py index 6f31b75..8c0d46d 100644 --- a/service_app/routers/rules/router.py +++ b/service_app/routers/rules/router.py @@ -68,7 +68,7 @@ def endpoint_restriction_list(request: Request): @endpoint_restriction_route.post( - path="/endpoint/available", summary="List extra restriction to endpoints list" + path="/endpoint/available", summary="Check extra restriction to endpoint available" ) def endpoint_restriction_available(request: Request, data: CheckEndpointAccess): token_dict, records = parse_token_object_to_dict(request=request), [] @@ -96,7 +96,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess): EndpointRestriction.raise_http_exception( status_code="HTTP_404_NOT_FOUND", error_case="UNAUTHORIZED", - message="Only Occupant can see this data", + message="This endpoint is not available for this occupant", data={}, ) return dict( @@ -112,7 +112,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess): EndpointRestriction.raise_http_exception( status_code="HTTP_404_NOT_FOUND", error_case="UNAUTHORIZED", - message="Only Occupant can see this data", + message="This endpoint is not available for this employee", data={}, ) return dict(