summaryrefslogtreecommitdiff
path: root/kitchen/urls.py
diff options
context:
space:
mode:
authorCaine <caine@jihakuz.xyz>2026-04-02 16:33:31 +0100
committerCaine <caine@jihakuz.xyz>2026-04-02 16:33:31 +0100
commitfe00286f7558d379d392f8a46d10a4689f95d472 (patch)
tree23a27fc7b8c97b56e30d9a7bd9135a921be83209 /kitchen/urls.py
parent487bf469795d70fb2bfdbee882d00f0c5e726a9a (diff)
Add API: URLs, token auth, what-can-i-cook endpoint, log-cook with pantry deduction, browsable API
Diffstat (limited to 'kitchen/urls.py')
-rw-r--r--kitchen/urls.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/kitchen/urls.py b/kitchen/urls.py
new file mode 100644
index 0000000..7dedb7a
--- /dev/null
+++ b/kitchen/urls.py
@@ -0,0 +1,22 @@
+from django.urls import path, include
+from rest_framework.routers import DefaultRouter
+from . import views
+
+router = DefaultRouter()
+router.register(r"tags", views.TagViewSet)
+router.register(r"ingredients", views.IngredientViewSet)
+router.register(r"pantry", views.PantryItemViewSet)
+router.register(r"meta-recipes", views.MetaRecipeViewSet)
+router.register(r"slots", views.SlotViewSet)
+router.register(r"slot-options", views.SlotOptionViewSet)
+router.register(r"meta-recipe-bases", views.MetaRecipeBaseViewSet)
+router.register(r"recipes", views.RecipeViewSet)
+router.register(r"recipe-ingredients", views.RecipeIngredientViewSet)
+router.register(r"cook-log", views.CookLogViewSet)
+router.register(r"shopping-list", views.ShoppingListItemViewSet)
+
+urlpatterns = [
+ path("", include(router.urls)),
+ path("what-can-i-cook/", views.what_can_i_cook, name="what-can-i-cook"),
+ path("log-cook/", views.log_cook, name="log-cook"),
+]