Files
aurora-moments/api/apps/moments/urls.py
T
KrisandClaude Sonnet 5 4877e0a779 Initial commit: Aurora Moments self-hosted photo/video sharing platform
Django/DRF + PostgreSQL/Redis/Celery backend with accounts, library,
moments, and notifications apps; React/TypeScript/Vite frontend with
Instagram-style sidebar nav, feed, profiles, nested comment replies,
notifications, and photo/video upload with ffmpeg-generated posters.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-10 10:28:53 -05:00

20 lines
941 B
Python

from django.urls import path
from rest_framework.routers import DefaultRouter
from .views import CommentViewSet, MomentViewSet, ReactionViewSet
router = DefaultRouter()
router.register("", MomentViewSet, basename="moment")
comments_list = CommentViewSet.as_view({"get": "list", "post": "create"})
comments_detail = CommentViewSet.as_view({"get": "retrieve", "delete": "destroy"})
reactions_list = ReactionViewSet.as_view({"get": "list", "post": "create"})
reactions_detail = ReactionViewSet.as_view({"get": "retrieve", "delete": "destroy"})
urlpatterns = [
path("<int:moment_pk>/comments/", comments_list, name="moment-comments-list"),
path("<int:moment_pk>/comments/<int:pk>/", comments_detail, name="moment-comments-detail"),
path("<int:moment_pk>/reactions/", reactions_list, name="moment-reactions-list"),
path("<int:moment_pk>/reactions/<int:pk>/", reactions_detail, name="moment-reactions-detail"),
] + router.urls