15 lines
371 B
Python
15 lines
371 B
Python
from api.core.Gzip import register_gzip_request
|
|
from fastapi import APIRouter, Body
|
|
from api.core.Response import response
|
|
from api.dp import AltersDep
|
|
from services.calc_service import calculate
|
|
|
|
router = APIRouter()
|
|
|
|
register_gzip_request(router)
|
|
|
|
|
|
@router.post('/calc')
|
|
def calc(state: AltersDep, config=Body(None)):
|
|
return response(data=calculate(state, config))
|