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,6 +1,6 @@
import datetime
#from datetime import datetime, time, timedelta
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_site_domain_obj(
@router.patch('/site/domain/{obj_id}', response_model=Resp_Body_Base)
async def patch_site_domain_obj(
obj: Site_Domain_Base,
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(..., ),
return_obj: bool = True,
by_alias: bool = True,
@@ -322,7 +322,7 @@ async def get_site_domain_obj(
@router.delete('/site/domain/{obj_id}', response_model=Resp_Body_Base)
async def delete_site_domain_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,
):