from django.urls import path
from users import views
from rest_framework.routers import DefaultRouter
from rest_framework_jwt.views import obtain_jwt_token


router = DefaultRouter()
# 用户信息视图集
router.register('user', views.UserViewset)

urlpatterns = [
    # jwt 登录视图，使用jwt自动签发token
    path('login/', obtain_jwt_token),
    # 短信验证码接口
    path('getcode/', views.send.as_view()),
]

urlpatterns += router.urls