nk20/apps/sheets/api/urls.py

20 lines
842 B
Python

# Copyright (C) 2018-2021 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from sheets.api.views import SheetViewSet, FoodViewSet, FoodOptionViewSet, MealViewSet, OrderViewSet, \
OrderedMealViewSet, OrderedFoodViewSet, SheetOrderTransactionViewSet
def register_sheets_urls(router, path):
"""
Configure router for Sheets REST API.
"""
router.register(path + '/sheet', SheetViewSet)
router.register(path + '/food', FoodViewSet)
router.register(path + '/foodoption', FoodOptionViewSet)
router.register(path + '/meal', MealViewSet)
router.register(path + '/order', OrderViewSet)
router.register(path + '/orderedmeal', OrderedMealViewSet)
router.register(path + '/orderedfood', OrderedFoodViewSet)
router.register(path + '/sheetordertransaction', SheetOrderTransactionViewSet)