Set ORJSONResponse as default response class

This commit is contained in:
2022-04-11 20:58:36 +03:00
parent 18b95519c5
commit f169178175
3 changed files with 46 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
from fastapi import FastAPI
from fastapi.responses import ORJSONResponse
from prometheus_fastapi_instrumentator import Instrumentator
@@ -8,7 +9,7 @@ from core.db import database
def start_app() -> FastAPI:
app = FastAPI()
app = FastAPI(default_response_class=ORJSONResponse)
app.state.database = database