McDuck/main/urls.py

34 lines
1.1 KiB
Python
Raw Normal View History

2024-08-29 09:21:58 +00:00
# urls.py
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from users.views import UserViewSet, DailyRewardViewSet, DailyRewardsListViewSet, BalanceViewSet, LevelsViewSet
from tapdata.views import FarmingViewSet
from stacking.views import UserStakeViewSet, StakeViewSet
2024-08-31 07:10:39 +00:00
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
2024-08-29 09:21:58 +00:00
""" from tapdata.views import TapDataViewSet
from stacking.views import UserStakeViewSet, StakeViewSet """
router = DefaultRouter()
router.register(r'users', UserViewSet)
router.register(r'dailyreward', DailyRewardViewSet)
router.register(r'dailyrewardlist', DailyRewardsListViewSet)
router.register(r'balance', BalanceViewSet)
router.register(r'levels', LevelsViewSet)
router.register(r'farming', FarmingViewSet)
router.register(r'stacking', UserStakeViewSet)
router.register(r'stake', StakeViewSet)
urlpatterns = [
path('api/', include(router.urls)),
2024-08-31 07:10:39 +00:00
path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
2024-08-29 09:21:58 +00:00
]