Skip to content

Commit

Permalink
added argument endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
purple-void committed Aug 7, 2024
1 parent eb9f5d8 commit 5c6af28
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion backend/rebutify/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
router = routers.DefaultRouter()
router.register(r"status/alive", views.StatusViewSet, basename="alive")
router.register(r"posts", views.PostViewSet, basename="posts")
router.register(r"arguments", views.ArgumentViewSet, basename="arguments")
router.register(
r"rebuttals",
views.RebuttalViewSet,
Expand Down Expand Up @@ -71,4 +70,29 @@
SpectacularRedocView.as_view(url_name="schema"),
name="redoc-ui",
),
path(
"api/arguments",
views.ArgumentViewSet.as_view({"get": "list"}),
name="arguments",
),
path(
"api/arguments/<int:id>",
views.ArgumentViewSet.as_view({"get": "list"}),
name="arguments",
),
path(
"api/arguments/add",
views.ArgumentViewSet.as_view({"post": "create"}),
name="arguments",
),
path(
"api/arguments/<int:id>/edit",
views.ArgumentViewSet.as_view({"put": "edit"}),
name="arguments",
),
path(
"api/arguments/<int:id>/delete",
views.ArgumentViewSet.as_view({"delete": "delete"}),
name="arguments",
),
]

0 comments on commit 5c6af28

Please sign in to comment.