endpoint_restriction_available updated

This commit is contained in:
berkay 2025-01-01 14:11:21 +03:00
parent 73645ce3ca
commit 39a839c43c
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ class Config:
] ]
NOT_SECURE_PATHS = [ NOT_SECURE_PATHS = [
"/access/endpoints/available", "/access/endpoints/available",
"/access/endpoint/available" "/access/endpoint/available",
"/validations/endpoint", "/validations/endpoint",
"/authentication/avatar", "/authentication/avatar",
] ]

View File

@ -68,7 +68,7 @@ def endpoint_restriction_list(request: Request):
@endpoint_restriction_route.post( @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): def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
token_dict, records = parse_token_object_to_dict(request=request), [] 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( EndpointRestriction.raise_http_exception(
status_code="HTTP_404_NOT_FOUND", status_code="HTTP_404_NOT_FOUND",
error_case="UNAUTHORIZED", error_case="UNAUTHORIZED",
message="Only Occupant can see this data", message="This endpoint is not available for this occupant",
data={}, data={},
) )
return dict( return dict(
@ -112,7 +112,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
EndpointRestriction.raise_http_exception( EndpointRestriction.raise_http_exception(
status_code="HTTP_404_NOT_FOUND", status_code="HTTP_404_NOT_FOUND",
error_case="UNAUTHORIZED", error_case="UNAUTHORIZED",
message="Only Occupant can see this data", message="This endpoint is not available for this employee",
data={}, data={},
) )
return dict( return dict(