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, json
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
@@ -87,7 +87,7 @@ async def post_event_abstract_obj(
@router.patch('/event/abstract/{event_abstract_id}', response_model=Resp_Body_Base)
async def patch_event_abstract_obj(
event_abstract_obj: Event_Abstract_In,
event_abstract_id: str = Query(..., min_length=11, max_length=22),
event_abstract_id: str = Path(min_length=11, max_length=22),
# create_sub_obj: bool = False,
# fail_any: bool = True, # Fail if any thing goes wrong for sub objects
@@ -142,7 +142,7 @@ async def patch_event_abstract_obj(
# Updated 2023-03-22
@router.get('/event/abstract/{event_abstract_id}', response_model=Resp_Body_Base)
async def get_event_abstract_obj(
event_abstract_id: str = Query(..., min_length=11, max_length=22),
event_abstract_id: str = Path(min_length=11, max_length=22),
inc_event_cfg: bool = False,
inc_event_file_list: bool = False,
@@ -199,7 +199,7 @@ async def get_event_abstract_obj(
# Updated 2023-05-22
@router.get('/event/{event_id}/event/abstract/list', response_model=Resp_Body_Base)
async def get_event_id_event_abstract_obj_li(
event_id: str = Query(..., min_length=11, max_length=22),
event_id: str = Path(min_length=11, max_length=22),
# inc_address: bool = False,
# inc_contact: bool = False,
@@ -264,7 +264,7 @@ async def get_event_id_event_abstract_obj_li(
# # Updated 2023-03-22
# @router.delete('/event/abstract/{event_abstract_id}', response_model=Resp_Body_Base)
# def delete_event_abstract_obj(
# event_abstract_id: str = Query(..., min_length=11, max_length=22),
# event_abstract_id: str = Path(min_length=11, max_length=22),
# method: str = None, # None, delete, disable, hide