events updated
This commit is contained in:
@@ -16,39 +16,27 @@ modules_route.include_router(modules_route, include_in_schema=True)
|
||||
|
||||
@modules_route.post(path="/list", summary="List Active/Delete/Confirm Modules")
|
||||
def modules_list(request: Request, list_options: ListOptions):
|
||||
from events.events_modules import ModulesEvents
|
||||
|
||||
token_dict = parse_token_object_to_dict(request=request)
|
||||
active_function = getattr(ModulesEvents, "modules_list")
|
||||
return active_function(list_options=list_options, token_dict=token_dict)
|
||||
return token_dict.available_event(list_options=list_options, token_dict=token_dict)
|
||||
|
||||
|
||||
@modules_route.post(path="/create", summary="Create Modules with given auth levels")
|
||||
def modules_create(request: Request, data: DepartmentsPydantic):
|
||||
from events.events_modules import ModulesEvents
|
||||
|
||||
token_dict = parse_token_object_to_dict(request=request)
|
||||
active_function = getattr(ModulesEvents, "modules_create")
|
||||
return active_function(data=data, token_dict=token_dict)
|
||||
return token_dict.available_event(data=data, token_dict=token_dict)
|
||||
|
||||
|
||||
@modules_route.post(
|
||||
path="/update/{module_uu_id}", summary="Update Modules with given auth levels"
|
||||
)
|
||||
def modules_update(request: Request, module_uu_id: str, data: DepartmentsPydantic):
|
||||
from events.events_modules import ModulesEvents
|
||||
|
||||
token_dict = parse_token_object_to_dict(request=request)
|
||||
active_function = getattr(ModulesEvents, "modules_update")
|
||||
return active_function(data=data, module_uu_id=module_uu_id, token_dict=token_dict)
|
||||
return token_dict.available_event(data=data, module_uu_id=module_uu_id, token_dict=token_dict)
|
||||
|
||||
|
||||
@modules_route.patch(
|
||||
path="/patch/{module_uu_id}", summary="Patch Modules with given auth levels"
|
||||
)
|
||||
def modules_patch(request: Request, module_uu_id: str, data: PatchRecord):
|
||||
from events.events_modules import ModulesEvents
|
||||
|
||||
token_dict = parse_token_object_to_dict(request=request)
|
||||
active_function = getattr(ModulesEvents, "modules_patch")
|
||||
return active_function(data=data, token_dict=token_dict)
|
||||
return token_dict.available_event(data=data, module_uu_id=module_uu_id, token_dict=token_dict)
|
||||
|
||||
Reference in New Issue
Block a user