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-21 17:13:16 +03:00
|
|
|
from passfinder.recomendations.api.views import TinderView, PersonalRecommendation
|
2023-05-23 23:36:45 +03:00
|
|
|
from passfinder.users.api.views import (
|
|
|
|
UserViewSet,
|
|
|
|
CreateUserPreferenceApiView,
|
|
|
|
ListUserFavoritePointsApiView,
|
|
|
|
)
|
2023-05-21 13:37:21 +03:00
|
|
|
|
|
|
|
router = DefaultRouter()
|
|
|
|
|
2023-05-22 22:29:46 +03:00
|
|
|
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-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")),
|
2023-05-22 22:29:46 +03:00
|
|
|
path("user/preference", CreateUserPreferenceApiView.as_view()),
|
2023-05-23 23:36:45 +03:00
|
|
|
path("user/favorite", ListUserFavoritePointsApiView.as_view()),
|
2023-05-21 20:46:07 +03:00
|
|
|
]
|
|
|
|
urlpatterns += router.urls
|