General clean up of everything.
This commit is contained in:
@@ -4,7 +4,8 @@ from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, stat
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
from ..lib_general import *
|
||||
from ..lib_general import log, logging
|
||||
#from ..log import *
|
||||
from app.config import settings
|
||||
from app.db_sql import *
|
||||
|
||||
@@ -42,8 +43,8 @@ async def post_contact_obj(
|
||||
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_contact_obj(
|
||||
obj: Contact_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj: Contact_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
@@ -69,12 +70,12 @@ async def patch_contact_obj(
|
||||
|
||||
@router.get('/list', response_model=Resp_Body_Base)
|
||||
async def get_contact_obj_li(
|
||||
for_obj_type: Optional[str] = Query(None, min_length=2, max_length=50),
|
||||
for_obj_id: Optional[str] = Query(None, min_length=1, max_length=22),
|
||||
group: Optional[str] = Query(None, min_length=2, max_length=50),
|
||||
for_obj_type: str = Query(None, min_length=2, max_length=50),
|
||||
for_obj_id: str = Query(None, min_length=1, max_length=22),
|
||||
group: str = Query(None, min_length=2, max_length=50),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
by_alias: bool = True,
|
||||
exclude_unset: bool = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
Reference in New Issue
Block a user