backend/config/api_router.py

25 lines
836 B
Python
Raw Normal View History

2023-05-21 20:46:07 +03:00
from django.urls import path, include
2023-05-21 13:37:21 +03:00
from rest_framework.routers import DefaultRouter
2023-05-24 17:58:51 +03:00
from passfinder.recomendations.api.views import TinderView, PersonalRecommendation, OnboardingViewset
from passfinder.users.api.views import (
UserViewSet,
CreateUserPreferenceApiView,
ListUserFavoritePointsApiView,
)
2023-05-21 13:37:21 +03:00
router = DefaultRouter()
router.register("tinder", TinderView)
2023-05-21 17:13:16 +03:00
router.register("recommendations", PersonalRecommendation)
2023-05-21 20:46:07 +03:00
router.register("user", UserViewSet)
2023-05-24 17:58:51 +03:00
router.register('onboarding', OnboardingViewset)
2023-05-21 13:37:21 +03:00
2023-05-18 20:25:22 +03:00
app_name = "api"
2023-05-21 20:46:07 +03:00
urlpatterns = [
path("", include("passfinder.events.api.urls")),
path("auth/", include("passfinder.users.api.urls")),
path("user/preference", CreateUserPreferenceApiView.as_view()),
path("user/favorite", ListUserFavoritePointsApiView.as_view()),
2023-05-21 20:46:07 +03:00
]
urlpatterns += router.urls