created design pattern
This commit is contained in:
@@ -2,7 +2,7 @@ from ApiControllers.abstracts.event_clusters import Event
|
||||
from Validations.people.validations import (
|
||||
REQUESTAWMXNTKMGPPOJWRCTZUBADNFLQDBDYVQAORFAVCSXUUHEBQHCEPCSKFBADBODFDBPYKOVINV,
|
||||
)
|
||||
from Controllers.Postgres.pagination import Pagination, PaginationResult, PaginateOnly
|
||||
from Controllers.Postgres.pagination import ListOptions, Pagination, PaginationResult, PaginateOnly
|
||||
from Controllers.Postgres.response import EndpointResponse
|
||||
from Schemas import People
|
||||
|
||||
@@ -34,7 +34,7 @@ SupersPeopleListEvent = Event(
|
||||
)
|
||||
|
||||
|
||||
def supers_people_create_callable(list_options):
|
||||
def supers_people_create_callable():
|
||||
"""
|
||||
Example callable method
|
||||
"""
|
||||
@@ -70,11 +70,11 @@ def supers_people_update_callable():
|
||||
SupersPeopleUpdateEvent.event_callable = supers_people_update_callable
|
||||
|
||||
|
||||
def supers_people_list_callable(list_options: PaginateOnly):
|
||||
def supers_people_list_callable(data: PaginateOnly):
|
||||
"""
|
||||
Example callable method
|
||||
"""
|
||||
list_options = PaginateOnly(**list_options.model_dump())
|
||||
list_options = PaginateOnly(**data.model_dump())
|
||||
with People.new_session() as db_session:
|
||||
if list_options.query:
|
||||
people_list = People.filter_all(
|
||||
|
||||
Reference in New Issue
Block a user