Saving current progress with change from using Query() to Path()
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -45,7 +45,7 @@ async def post_journal_entry_obj(
|
||||
|
||||
@router.patch('/journal/entry/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_journal_entry_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj_id: str = Path(min_length=11, max_length=22),
|
||||
obj: Journal_Entry_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
@@ -131,7 +131,7 @@ async def get_journal_entry_obj_li(
|
||||
|
||||
@router.get('/journal/entry/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_journal_entry_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(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -206,7 +206,7 @@ async def get_journal_obj_journal_entry_list(
|
||||
|
||||
@router.delete('/journal/entry/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_journal_entry_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