Saving current progress with change from using Query() to Path()

This commit is contained in:
Scott Idem
2024-04-26 14:51:11 -04:00
parent b37f14d25c
commit f4eda34035
67 changed files with 236 additions and 236 deletions

View File

@@ -1,5 +1,5 @@
import datetime
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
@@ -23,7 +23,7 @@ router = APIRouter()
@router.patch('/event/badge/template/{event_badge_template_id}', response_model=Resp_Body_Base)
async def patch_event_badge_template_obj(
event_badge_template_obj: Event_Badge_Template_Base_In,
event_badge_template_id: str = Query(..., min_length=11, max_length=22),
event_badge_template_id: str = Path(min_length=11, max_length=22),
inc_event_badge_list: bool = False,
@@ -70,7 +70,7 @@ async def patch_event_badge_template_obj(
# Updated 2022-06-22
@router.get('/event/{event_id}/badge/template/list', response_model = Resp_Body_Base)
async def get_event_event_badge_template_obj_list(
event_id: str = Query(None, min_length=11, max_length=22),
event_id: str = Path(min_length=11, max_length=22),
inc_event_badge_list: bool = False,
commons: Common_Route_Params = Depends(common_route_params),
@@ -164,7 +164,7 @@ async def get_event_event_badge_template_obj_list(
# Updated 2021-09-08
@router.get('/event/badge/template/{event_badge_template_id}', response_model=Resp_Body_Base)
async def get_event_badge_template_obj(
event_badge_template_id: str = Query(..., min_length=11, max_length=22),
event_badge_template_id: str = Path(min_length=11, max_length=22),
limit: int = 5, # For now this covers any included objects or object lists
enabled: str = 'enabled', # For now this covers any included objects or object lists
x_account_id: str = Header(...),