44 lines
2.5 KiB
Python
44 lines
2.5 KiB
Python
from django.urls import path
|
|
from . import api, api_schema
|
|
from recipes import api as recipe_api
|
|
|
|
urlpatterns = [
|
|
path('auth/whoami/', api.whoami),
|
|
path('schema/', api_schema.schema),
|
|
path('food/today/', api.today),
|
|
path('food/products/', api.products),
|
|
path('food/products/lookup/', api.product_lookup),
|
|
path('food/products/create/', api.product_create),
|
|
path('food/products/import/', api.product_import),
|
|
path('food/log/', api.log_create),
|
|
path('food/log/<uuid:identifier>/', api.log_item),
|
|
path('food/log/<uuid:identifier>/attachments/', api.attachment_create),
|
|
path('food/attachments/<uuid:identifier>/file/', api.attachment_file),
|
|
path('food/attachments/<uuid:identifier>/', api.attachment_delete),
|
|
path('kitchen/items/', api.inventory_collection),
|
|
path('kitchen/import-groceries/', api.inventory_import_groceries),
|
|
path('kitchen/items/<uuid:identifier>/', api.inventory_item),
|
|
path('kitchen/stock/', api.inventory_stock),
|
|
path('kitchen/consumption/preview/', api.inventory_preview),
|
|
path('kitchen/consumption/', api.inventory_consume),
|
|
path('kitchen/consumption/<uuid:identifier>/undo/', api.inventory_undo),
|
|
path('hydration/daily/', api.hydration_daily),
|
|
path('hydration/manual/', api.hydration_log),
|
|
path('hydration/manual/<uuid:identifier>/', api.hydration_manual_entry),
|
|
path('hydration/settings/', api.hydration_settings),
|
|
path('recipes/', recipe_api.recipe_search),
|
|
path('recipes/cook-later/', recipe_api.recipe_cook_later_collection),
|
|
path('recipes/cook-later/<uuid:identifier>/', recipe_api.recipe_cook_later_item),
|
|
path('recipes/create/', recipe_api.recipe_create),
|
|
path('recipes/<uuid:identifier>/', recipe_api.recipe_item),
|
|
path('recipes/<uuid:identifier>/variations/', recipe_api.recipe_variation),
|
|
path('recipes/<uuid:identifier>/ingredients/', recipe_api.recipe_ingredient_create),
|
|
path('recipes/<uuid:identifier>/ingredients/<int:item_id>/', recipe_api.recipe_ingredient_item),
|
|
path('recipes/<uuid:identifier>/subrecipes/', recipe_api.recipe_subrecipe_create),
|
|
path('recipes/<uuid:identifier>/subrecipes/<int:item_id>/', recipe_api.recipe_subrecipe_delete),
|
|
path('recipes/<uuid:identifier>/stock/preview/', recipe_api.recipe_stock_preview),
|
|
path('recipes/<uuid:identifier>/stock/confirm/', recipe_api.recipe_stock_confirm),
|
|
path('recipes/stock-use/<uuid:identifier>/undo/', recipe_api.recipe_stock_undo),
|
|
path('recipes/<uuid:identifier>/log/', recipe_api.recipe_log),
|
|
]
|