Esempio n. 1
0
def get_c2_profile_list(
    db: Session = Depends(get_db),
    *,
    query: BasePaginationQuerySchema = Depends(C2PaginationQuery),
):
    query_data = BasePaginationQuerySchema.from_orm(query).dict(skip_defaults=True)
    c2_pagination_data = crud_c2.paginate(db, **query_data)
    return dict(result=c2_pagination_data)
Esempio n. 2
0
def get_server_list(
    db: Session = Depends(get_db),
    *,
    query: BasePaginationQuerySchema = Depends(PaginationQuery),
):
    query_data = BasePaginationQuerySchema.from_orm(query).dict()
    isp_pagination_data = crud_vps.paginate(db, **query_data)
    result = dict(result=isp_pagination_data)
    return result
Esempio n. 3
0
def get_redirector_list(
    db: Session = Depends(get_db),
    *,
    query: BasePaginationQuerySchema = Depends(PaginationQuery),
):
    query_data = BasePaginationQuerySchema.from_orm(query).dict()
    redirector_pagination_data = crud_redirector.paginate(db, **query_data)

    return dict(result=redirector_pagination_data)
Esempio n. 4
0
def get_site_template_list(
    db: Session = Depends(get_db),
    *,
    query: BasePaginationQuerySchema = Depends(PaginationQuery),
):
    query_data = BasePaginationQuerySchema.from_orm(query).dict(skip_defaults=True)
    template_site_pagination_data = crud_site_template.paginate(db, **query_data)

    return dict(result=template_site_pagination_data)
Esempio n. 5
0
def get_domain_grow_task_list(
        db: Session = Depends(get_db),
        *,
        query: BasePaginationQuerySchema = Depends(PaginationQuery),
):
    query_data = BasePaginationQuerySchema.from_orm(query).dict(
        skip_defaults=True)
    domain_grow_pagination_data = crud_domain_grow.paginate(db, **query_data)

    return dict(result=domain_grow_pagination_data)