robinhad commited on
Commit
b2a864a
1 Parent(s): df354fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -48,7 +48,7 @@ class LoggingMiddleware(BaseHTTPMiddleware):
48
  response = await call_next(request)
49
  return response
50
 
51
- # app.add_middleware(LoggingMiddleware)
52
 
53
  # This should be a secure secret key in a real application
54
  SECRET_KEY = "your_secret_key_here"
@@ -111,7 +111,7 @@ async def verify_token(token: str = Depends(api_key_query)):
111
  raise HTTPException(status_code=401, detail={"message": "Token is invalid"})
112
  return token
113
 
114
- #@app.get("/translate/", response_model=TranslationResponse)
115
  @app.post("/translate/", response_model=TranslationResponse)
116
  async def translate(
117
  request: Request,
 
48
  response = await call_next(request)
49
  return response
50
 
51
+ app.add_middleware(LoggingMiddleware)
52
 
53
  # This should be a secure secret key in a real application
54
  SECRET_KEY = "your_secret_key_here"
 
111
  raise HTTPException(status_code=401, detail={"message": "Token is invalid"})
112
  return token
113
 
114
+ @app.get("/translate/", response_model=TranslationResponse)
115
  @app.post("/translate/", response_model=TranslationResponse)
116
  async def translate(
117
  request: Request,