Saving current progress with change from using Query() to Path()
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import datetime, time
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
@@ -44,7 +44,7 @@ async def post_event_exhibit_obj(
|
||||
|
||||
@router.patch('/event/exhibit/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_event_exhibit_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Event_Exhibit_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -97,7 +97,7 @@ async def get_event_exhibit_obj_li(
|
||||
# Updated 2022-02-15
|
||||
@router.get('/event/exhibit/{event_exhibit_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_exhibit_obj(
|
||||
event_exhibit_id: str = Query(..., min_length=11, max_length=22),
|
||||
event_exhibit_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
inc_event_exhibit_tracking_list: bool = False,
|
||||
inc_event_badge: bool = False,
|
||||
@@ -140,7 +140,7 @@ async def get_event_exhibit_obj(
|
||||
|
||||
@router.delete('/event/exhibit/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_exhibit_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
response: Response = Response,
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user