Working on general POST, PATCH, SELECT list, SELECT, and DELETE template functions.
This commit is contained in:
@@ -9,7 +9,7 @@ from ..log import *
|
||||
from app.config import settings
|
||||
from app.db_sql import *
|
||||
|
||||
from .api_crud import post_obj_template, patch_obj_template
|
||||
from .api_crud import delete_obj_template, get_obj_template, get_obj_li_template, patch_obj_template, post_obj_template
|
||||
|
||||
from ..models.account_model import Account_Base
|
||||
from ..models.response_model import *
|
||||
@@ -18,7 +18,7 @@ from ..models.response_model import *
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.post('')
|
||||
@router.post('', response_model=Resp_Body_Base)
|
||||
async def post_account_obj(
|
||||
obj: Account_Base,
|
||||
x_account_id: str = Header(...),
|
||||
@@ -29,24 +29,23 @@ async def post_account_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_insert = 'account'
|
||||
obj_type = 'account'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
result = post_obj_template(
|
||||
table_name_insert=table_name_insert,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.patch('/{obj_id}')
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_account_obj(
|
||||
obj_id: str,
|
||||
obj: Account_Base,
|
||||
x_account_id: str = Header(...),
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj: Account_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -54,17 +53,74 @@ async def patch_account_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_update = 'account'
|
||||
obj_type = 'account'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=table_name_update)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=obj_type)
|
||||
obj_data_dict['id_random'] = obj_id
|
||||
result = patch_obj_template(
|
||||
table_name_update=table_name_update,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
obj_id=obj_id,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/list', response_model=Resp_Body_Base)
|
||||
async def get_account_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),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'account'
|
||||
result = get_obj_li_template(
|
||||
obj_type=obj_type,
|
||||
for_obj_type=for_obj_type,
|
||||
for_obj_id=for_obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_account_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'account'
|
||||
result = get_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_account_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'account'
|
||||
result = delete_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
)
|
||||
return result
|
||||
@@ -18,7 +18,7 @@ from ..models.response_model import *
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.post('')
|
||||
@router.post('', response_model=Resp_Body_Base)
|
||||
async def post_address_obj(
|
||||
obj: Address_Base,
|
||||
x_account_id: str = Header(...),
|
||||
@@ -41,11 +41,11 @@ async def post_address_obj(
|
||||
return result
|
||||
|
||||
|
||||
@router.patch('/{obj_id}')
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_address_obj(
|
||||
obj_id: str = Query(None, min_length=1, max_length=22),
|
||||
obj: Address_Base,
|
||||
x_account_id: str = Header(...),
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj: Address_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -68,7 +68,7 @@ async def patch_address_obj(
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/list')
|
||||
@router.get('/list', response_model=Resp_Body_Base)
|
||||
async def get_address_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),
|
||||
@@ -90,9 +90,9 @@ async def get_address_obj_li(
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/{obj_id}')
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_address_obj(
|
||||
obj_id: str = Query(None, min_length=1, max_length=22),
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -101,7 +101,6 @@ async def get_address_obj(
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'address'
|
||||
#obj_id = redis_lookup_id_random(record_id_random=obj_id, table_name=obj_type)
|
||||
result = get_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
@@ -111,16 +110,15 @@ async def get_address_obj(
|
||||
return result
|
||||
|
||||
|
||||
@router.delete('/{obj_id}')
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_address_obj(
|
||||
obj_id: str = Query(None, min_length=1, max_length=22),
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'address'
|
||||
#obj_id = redis_lookup_id_random(record_id_random=obj_id, table_name=obj_type)
|
||||
result = delete_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
|
||||
@@ -9,7 +9,7 @@ from ..log import *
|
||||
from app.config import settings
|
||||
from app.db_sql import *
|
||||
|
||||
from .api_crud import post_obj_template, patch_obj_template
|
||||
from .api_crud import delete_obj_template, get_obj_template, get_obj_li_template, patch_obj_template, post_obj_template
|
||||
|
||||
from ..models.contact_model import Contact_Base
|
||||
from ..models.response_model import *
|
||||
@@ -18,7 +18,7 @@ from ..models.response_model import *
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.post('')
|
||||
@router.post('', response_model=Resp_Body_Base)
|
||||
async def post_contact_obj(
|
||||
obj: Contact_Base,
|
||||
x_account_id: str = Header(...),
|
||||
@@ -29,24 +29,23 @@ async def post_contact_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_insert = 'contact'
|
||||
obj_type = 'contact'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
result = post_obj_template(
|
||||
table_name_insert=table_name_insert,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.patch('/{obj_id}')
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_contact_obj(
|
||||
obj_id: str,
|
||||
obj: Contact_Base,
|
||||
x_account_id: str = Header(...),
|
||||
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,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -54,17 +53,74 @@ async def patch_contact_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_update = 'contact'
|
||||
obj_type = 'contact'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=table_name_update)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=obj_type)
|
||||
obj_data_dict['id_random'] = obj_id
|
||||
result = patch_obj_template(
|
||||
table_name_update=table_name_update,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
obj_id=obj_id,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@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),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'contact'
|
||||
result = get_obj_li_template(
|
||||
obj_type=obj_type,
|
||||
for_obj_type=for_obj_type,
|
||||
for_obj_id=for_obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_contact_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'contact'
|
||||
result = get_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_contact_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'contact'
|
||||
result = delete_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
)
|
||||
return result
|
||||
@@ -9,7 +9,7 @@ from ..log import *
|
||||
from app.config import settings
|
||||
from app.db_sql import *
|
||||
|
||||
from .api_crud import post_obj_template, patch_obj_template
|
||||
from .api_crud import delete_obj_template, get_obj_template, get_obj_li_template, patch_obj_template, post_obj_template
|
||||
|
||||
from ..models.page_model import Page_Base
|
||||
from ..models.response_model import *
|
||||
@@ -18,7 +18,7 @@ from ..models.response_model import *
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.post('')
|
||||
@router.post('', response_model=Resp_Body_Base)
|
||||
async def post_page_obj(
|
||||
obj: Page_Base,
|
||||
x_account_id: str = Header(...),
|
||||
@@ -29,24 +29,23 @@ async def post_page_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_insert = 'page'
|
||||
obj_type = 'page'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
result = post_obj_template(
|
||||
table_name_insert=table_name_insert,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.patch('/{obj_id}')
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_page_obj(
|
||||
obj_id: str,
|
||||
obj: Page_Base,
|
||||
x_account_id: str = Header(...),
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj: Page_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -54,17 +53,74 @@ async def patch_page_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_update = 'page'
|
||||
obj_type = 'page'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=table_name_update)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=obj_type)
|
||||
obj_data_dict['id_random'] = obj_id
|
||||
result = patch_obj_template(
|
||||
table_name_update=table_name_update,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
obj_id=obj_id,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/list', response_model=Resp_Body_Base)
|
||||
async def get_page_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),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'page'
|
||||
result = get_obj_li_template(
|
||||
obj_type=obj_type,
|
||||
for_obj_type=for_obj_type,
|
||||
for_obj_id=for_obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_page_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'page'
|
||||
result = get_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_page_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'page'
|
||||
result = delete_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
)
|
||||
return result
|
||||
@@ -9,7 +9,7 @@ from ..log import *
|
||||
from app.config import settings
|
||||
from app.db_sql import *
|
||||
|
||||
from .api_crud import post_obj_template, patch_obj_template
|
||||
from .api_crud import delete_obj_template, get_obj_template, get_obj_li_template, patch_obj_template, post_obj_template
|
||||
|
||||
from ..models.person_model import Person_Base
|
||||
from ..models.response_model import *
|
||||
@@ -18,7 +18,7 @@ from ..models.response_model import *
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.post('')
|
||||
@router.post('', response_model=Resp_Body_Base)
|
||||
async def post_person_obj(
|
||||
obj: Person_Base,
|
||||
x_account_id: str = Header(...),
|
||||
@@ -29,24 +29,23 @@ async def post_person_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_insert = 'person'
|
||||
obj_type = 'person'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
result = post_obj_template(
|
||||
table_name_insert=table_name_insert,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.patch('/{obj_id}')
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_person_obj(
|
||||
obj_id: str,
|
||||
obj: Person_Base,
|
||||
x_account_id: str = Header(...),
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj: Person_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -54,17 +53,74 @@ async def patch_person_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_update = 'person'
|
||||
obj_type = 'person'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=table_name_update)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=obj_type)
|
||||
obj_data_dict['id_random'] = obj_id
|
||||
result = patch_obj_template(
|
||||
table_name_update=table_name_update,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
obj_id=obj_id,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/list', response_model=Resp_Body_Base)
|
||||
async def get_person_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),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'person'
|
||||
result = get_obj_li_template(
|
||||
obj_type=obj_type,
|
||||
for_obj_type=for_obj_type,
|
||||
for_obj_id=for_obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_person_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'person'
|
||||
result = get_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_person_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'person'
|
||||
result = delete_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
)
|
||||
return result
|
||||
@@ -9,7 +9,7 @@ from ..log import *
|
||||
from app.config import settings
|
||||
from app.db_sql import *
|
||||
|
||||
from .api_crud import post_obj_template, patch_obj_template
|
||||
from .api_crud import delete_obj_template, get_obj_template, get_obj_li_template, patch_obj_template, post_obj_template
|
||||
|
||||
from ..models.post_model import Post_Base
|
||||
from ..models.response_model import *
|
||||
@@ -18,7 +18,7 @@ from ..models.response_model import *
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.post('')
|
||||
@router.post('', response_model=Resp_Body_Base)
|
||||
async def post_post_obj(
|
||||
obj: Post_Base,
|
||||
x_account_id: str = Header(...),
|
||||
@@ -29,24 +29,23 @@ async def post_post_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_insert = 'post'
|
||||
obj_type = 'post'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
result = post_obj_template(
|
||||
table_name_insert=table_name_insert,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.patch('/{obj_id}')
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_post_obj(
|
||||
obj_id: str,
|
||||
obj: Post_Base,
|
||||
x_account_id: str = Header(...),
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj: Post_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -54,17 +53,74 @@ async def patch_post_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_update = 'post'
|
||||
obj_type = 'post'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=table_name_update)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=obj_type)
|
||||
obj_data_dict['id_random'] = obj_id
|
||||
result = patch_obj_template(
|
||||
table_name_update=table_name_update,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
obj_id=obj_id,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/list', response_model=Resp_Body_Base)
|
||||
async def get_post_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),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'post'
|
||||
result = get_obj_li_template(
|
||||
obj_type=obj_type,
|
||||
for_obj_type=for_obj_type,
|
||||
for_obj_id=for_obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_post_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'post'
|
||||
result = get_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_post_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'post'
|
||||
result = delete_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
)
|
||||
return result
|
||||
@@ -9,7 +9,7 @@ from ..log import *
|
||||
from app.config import settings
|
||||
from app.db_sql import *
|
||||
|
||||
from .api_crud import post_obj_template, patch_obj_template
|
||||
from .api_crud import delete_obj_template, get_obj_template, get_obj_li_template, patch_obj_template, post_obj_template
|
||||
|
||||
from ..models.post_comment_model import Post_Comment_Base
|
||||
from ..models.response_model import *
|
||||
@@ -18,7 +18,7 @@ from ..models.response_model import *
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.post('')
|
||||
@router.post('', response_model=Resp_Body_Base)
|
||||
async def post_post_comment_obj(
|
||||
obj: Post_Comment_Base,
|
||||
x_account_id: str = Header(...),
|
||||
@@ -29,24 +29,23 @@ async def post_post_comment_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_insert = 'post_comment'
|
||||
obj_type = 'post_comment'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
result = post_obj_template(
|
||||
table_name_insert=table_name_insert,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.patch('/{obj_id}')
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_post_comment_obj(
|
||||
obj_id: str,
|
||||
obj: Post_Comment_Base,
|
||||
x_account_id: str = Header(...),
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj: Post_Comment_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -54,17 +53,74 @@ async def patch_post_comment_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_update = 'post_comment'
|
||||
obj_type = 'post_comment'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=table_name_update)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=obj_type)
|
||||
obj_data_dict['id_random'] = obj_id
|
||||
result = patch_obj_template(
|
||||
table_name_update=table_name_update,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
obj_id=obj_id,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/list', response_model=Resp_Body_Base)
|
||||
async def get_post_comment_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),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'post_comment'
|
||||
result = get_obj_li_template(
|
||||
obj_type=obj_type,
|
||||
for_obj_type=for_obj_type,
|
||||
for_obj_id=for_obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_post_comment_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'post_comment'
|
||||
result = get_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_post_comment_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'post_comment'
|
||||
result = delete_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
)
|
||||
return result
|
||||
@@ -9,7 +9,7 @@ from ..log import *
|
||||
from app.config import settings
|
||||
from app.db_sql import *
|
||||
|
||||
from .api_crud import post_obj_template, patch_obj_template
|
||||
from .api_crud import delete_obj_template, get_obj_template, get_obj_li_template, patch_obj_template, post_obj_template
|
||||
|
||||
from ..models.product_model import Product_Base
|
||||
from ..models.response_model import *
|
||||
@@ -18,7 +18,7 @@ from ..models.response_model import *
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.post('')
|
||||
@router.post('', response_model=Resp_Body_Base)
|
||||
async def post_product_obj(
|
||||
obj: Product_Base,
|
||||
x_account_id: str = Header(...),
|
||||
@@ -29,24 +29,23 @@ async def post_product_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_insert = 'product'
|
||||
obj_type = 'product'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
result = post_obj_template(
|
||||
table_name_insert=table_name_insert,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.patch('/{obj_id}')
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_product_obj(
|
||||
obj_id: str,
|
||||
obj: Product_Base,
|
||||
x_account_id: str = Header(...),
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj: Product_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -54,17 +53,74 @@ async def patch_product_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_update = 'product'
|
||||
obj_type = 'product'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=table_name_update)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=obj_type)
|
||||
obj_data_dict['id_random'] = obj_id
|
||||
result = patch_obj_template(
|
||||
table_name_update=table_name_update,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
obj_id=obj_id,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/list', response_model=Resp_Body_Base)
|
||||
async def get_product_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),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'product'
|
||||
result = get_obj_li_template(
|
||||
obj_type=obj_type,
|
||||
for_obj_type=for_obj_type,
|
||||
for_obj_id=for_obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_product_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'product'
|
||||
result = get_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_product_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'product'
|
||||
result = delete_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
)
|
||||
return result
|
||||
@@ -9,7 +9,7 @@ from ..log import *
|
||||
from app.config import settings
|
||||
from app.db_sql import *
|
||||
|
||||
from .api_crud import post_obj_template, patch_obj_template
|
||||
from .api_crud import delete_obj_template, get_obj_template, get_obj_li_template, patch_obj_template, post_obj_template
|
||||
|
||||
from ..models.user_model import User_Base
|
||||
from ..models.response_model import *
|
||||
@@ -18,7 +18,7 @@ from ..models.response_model import *
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.post('')
|
||||
@router.post('', response_model=Resp_Body_Base)
|
||||
async def post_user_obj(
|
||||
obj: User_Base,
|
||||
x_account_id: str = Header(...),
|
||||
@@ -29,24 +29,23 @@ async def post_user_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_insert = 'user'
|
||||
obj_type = 'user'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
result = post_obj_template(
|
||||
table_name_insert=table_name_insert,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.patch('/{obj_id}')
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_user_obj(
|
||||
obj_id: str,
|
||||
obj: User_Base,
|
||||
x_account_id: str = Header(...),
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
obj: User_Base = None,
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
@@ -54,17 +53,74 @@ async def patch_user_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
table_name_update = 'user'
|
||||
obj_type = 'user'
|
||||
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=table_name_update)
|
||||
obj_data_dict['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=obj_type)
|
||||
obj_data_dict['id_random'] = obj_id
|
||||
result = patch_obj_template(
|
||||
table_name_update=table_name_update,
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
obj_id=obj_id,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/list', response_model=Resp_Body_Base)
|
||||
async def get_user_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),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'user'
|
||||
result = get_obj_li_template(
|
||||
obj_type=obj_type,
|
||||
for_obj_type=for_obj_type,
|
||||
for_obj_id=for_obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.get('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def get_user_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'user'
|
||||
result = get_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_user_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: str = Header(...),
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
obj_type = 'user'
|
||||
result = delete_obj_template(
|
||||
obj_type=obj_type,
|
||||
obj_id=obj_id,
|
||||
)
|
||||
return result
|
||||
Reference in New Issue
Block a user