forked from enviPath/enviPy
24 lines
615 B
Python
24 lines
615 B
Python
from django.conf import settings as s
|
|
from ninja import Router
|
|
from ninja_extra.pagination import paginate
|
|
|
|
from epdb.logic import SettingManager
|
|
|
|
from ..pagination import EnhancedPageNumberPagination
|
|
from ..schemas import SettingOutSchema
|
|
|
|
router = Router()
|
|
|
|
|
|
@router.get("/settings/", response=EnhancedPageNumberPagination.Output[SettingOutSchema])
|
|
@paginate(
|
|
EnhancedPageNumberPagination,
|
|
page_size=s.API_PAGINATION_DEFAULT_PAGE_SIZE,
|
|
)
|
|
def list_all_pathways(request):
|
|
"""
|
|
List all pathways from reviewed packages.
|
|
"""
|
|
user = request.user
|
|
return SettingManager.get_all_settings(user)
|