mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-01 17:50:39 +08:00
15 lines
385 B
Python
15 lines
385 B
Python
from fastapi.exceptions import HTTPException
|
|
from fastapi.responses import JSONResponse
|
|
|
|
from module.models.response import ResponseModel
|
|
|
|
|
|
def u_response(response_model: ResponseModel):
|
|
return JSONResponse(
|
|
status_code=response_model.status_code,
|
|
content={
|
|
"msg_en": response_model.msg_en,
|
|
"msg_zh": response_model.msg_zh,
|
|
},
|
|
)
|