fix: Add Body() annotation to approval endpoint (v1.3.77)
- Add Body(...) to request parameter - Import Body from fastapi - Fix FastAPI body parameter handling
This commit is contained in:
parent
7cb38663bc
commit
17cd871909
@ -9,7 +9,7 @@ Isoleret routing uden påvirkning af existing Hub endpoints.
|
|||||||
import logging
|
import logging
|
||||||
from typing import Optional, List, Dict, Any
|
from typing import Optional, List, Dict, Any
|
||||||
|
|
||||||
from fastapi import APIRouter, HTTPException, Depends
|
from fastapi import APIRouter, HTTPException, Depends, Body
|
||||||
from fastapi.responses import JSONResponse
|
from fastapi.responses import JSONResponse
|
||||||
|
|
||||||
from app.core.database import execute_query, execute_update, execute_query_single
|
from app.core.database import execute_query, execute_update, execute_query_single
|
||||||
@ -218,7 +218,7 @@ async def get_next_pending_entry(
|
|||||||
@router.post("/wizard/approve/{time_id}", response_model=TModuleTimeWithContext, tags=["Wizard"])
|
@router.post("/wizard/approve/{time_id}", response_model=TModuleTimeWithContext, tags=["Wizard"])
|
||||||
async def approve_time_entry(
|
async def approve_time_entry(
|
||||||
time_id: int,
|
time_id: int,
|
||||||
request: Dict[str, Any],
|
request: Dict[str, Any] = Body(...),
|
||||||
user_id: Optional[int] = None
|
user_id: Optional[int] = None
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user