black shift
This commit is contained in:
@@ -23,26 +23,26 @@ class CommonHeaders(BaseModel):
|
||||
tz: str = Header(None, alias="timezone"),
|
||||
):
|
||||
token = request.headers.get(api_config.ACCESS_TOKEN_TAG, None)
|
||||
|
||||
|
||||
# Extract operation_id from the route
|
||||
operation_id = None
|
||||
if hasattr(request.scope.get('route'), 'operation_id'):
|
||||
operation_id = request.scope.get('route').operation_id
|
||||
|
||||
if hasattr(request.scope.get("route"), "operation_id"):
|
||||
operation_id = request.scope.get("route").operation_id
|
||||
|
||||
return cls(
|
||||
language=language,
|
||||
domain=domain,
|
||||
timezone=tz,
|
||||
token=token,
|
||||
request=request,
|
||||
language=language,
|
||||
domain=domain,
|
||||
timezone=tz,
|
||||
token=token,
|
||||
request=request,
|
||||
response=response,
|
||||
operation_id=operation_id
|
||||
operation_id=operation_id,
|
||||
)
|
||||
|
||||
|
||||
def get_headers_dict(self):
|
||||
"""Convert the headers to a dictionary format used in the application"""
|
||||
import uuid
|
||||
|
||||
|
||||
return {
|
||||
"language": self.language or "",
|
||||
"domain": self.domain or "",
|
||||
|
||||
Reference in New Issue
Block a user