Skip to content

Commit

Permalink
refactor: api router endpoints to plural
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlitgrace committed Dec 4, 2024
1 parent ee2b2db commit 79407c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions backend/apps/quiblet/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

from .viewsets import QuibletViewSet

app_name = 'quiblet_api_v1'

router = DefaultRouter()
router.register('', QuibletViewSet, basename='quiblet')
router.register(r'', QuibletViewSet)

urlpatterns = []
urlpatterns += router.urls
6 changes: 3 additions & 3 deletions backend/apps/user/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# main router for users/ and profiles/
router = DefaultRouter()

router.register('', viewsets.UserViewSet, basename='user')
router.register('profile', viewsets.ProfileViewSet, basename='profile')
router.register(r'', viewsets.UserViewSet)
router.register(r'profiles', viewsets.ProfileViewSet)
# profiles of requested user
router.register('me/profiles', viewsets.MyProfilesViewSet, basename='my-profiles')
router.register(r'me/profiles', viewsets.MyProfilesViewSet, basename='me-profile')

# fmt: off
urlpatterns = [
Expand Down

0 comments on commit 79407c5

Please sign in to comment.