34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
# 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
|
|
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
|
|
|
|
""" 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)),
|
|
path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
|
path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
|
|
]
|