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
@@ -48,7 +48,7 @@ async def post_address_obj(
@router.patch('/{address_obj_id}', response_model=Resp_Body_Base)
async def patch_address_obj(
address_obj: Address_Base,
address_obj_id: str = Query(..., min_length=1, max_length=22),
address_obj_id: str = Path(min_length=1, max_length=22),
x_account_id: Optional[str] = Header(..., ),
return_obj: Optional[bool] = True,
by_alias: Optional[bool] = True,
@@ -77,7 +77,7 @@ async def patch_address_obj(
@router.patch('/{address_id}/json', response_model=Resp_Body_Base)
async def patch_address_json(
address_obj: Address_Base,
address_id: str = Query(..., min_length=1, max_length=22),
address_id: str = Path(min_length=1, max_length=22),
create_sub_obj: bool = False,
x_account_id: Optional[str] = Header(..., ),
return_obj: Optional[bool] = True,
@@ -141,7 +141,7 @@ async def get_address_obj_li(
@router.get('/{obj_id}', response_model=Resp_Body_Base)
async def get_address_obj(
obj_id: str = Query(..., min_length=1, max_length=22),
obj_id: str = Path(min_length=1, max_length=22),
x_account_id: str = Header(...),
by_alias: Optional[bool] = True,
include: Optional[list] = [],
@@ -165,7 +165,7 @@ async def get_address_obj(
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
async def delete_address_obj(
obj_id: str = Query(..., min_length=1, max_length=22),
obj_id: str = Path(min_length=1, max_length=22),
x_account_id: str = Header(...),
response: Response = Response,
):