Adding config endpoint
This commit is contained in:
committed by
Magel, Denis
parent
2a165c91b6
commit
579c62319c
16
src/config/router.py
Normal file
16
src/config/router.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from fastapi import APIRouter
|
||||
from .schema import ConfigSchema, ConfigReturnSchema
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger("uvicorn")
|
||||
|
||||
router = APIRouter(tags=["config"])
|
||||
|
||||
|
||||
@router.post("/config", response_model=ConfigReturnSchema)
|
||||
async def create_config(config: ConfigSchema) -> ConfigSchema:
|
||||
"""
|
||||
Endpoint to receive and return configuration data.
|
||||
"""
|
||||
logger.info("Received configuration data")
|
||||
return config
|
||||
Reference in New Issue
Block a user