|
@@ -8,19 +8,16 @@ from schema_graph.views import Schema
|
|
|
from sharix_admin.apiviews import *
|
|
|
from sharix_admin.views import *
|
|
|
|
|
|
+# START Backend
|
|
|
+# TODO: move to backend repo
|
|
|
router = routers.SimpleRouter()
|
|
|
router.register(r'sharix-users', SharixUserMVS)
|
|
|
router.register(r'group', GroupMVS)
|
|
|
+# END Backend
|
|
|
|
|
|
app_name = "sharix_admin"
|
|
|
|
|
|
urlpatterns = [
|
|
|
- # Регистрация / Вход / Выход
|
|
|
- path('auth/signup/', ShariXSignUpView.as_view(), name="auth_signup"),
|
|
|
- path('auth/login/', ShariXLoginView.as_view(), name='auth_login'),
|
|
|
- path('auth/logout/', login_required(LogoutView.as_view()), name="auth_logout"),
|
|
|
- path('auth/reset-password/', ShariXResetPasswordView.as_view(), name='auth_reset_password'),
|
|
|
-
|
|
|
# Главная
|
|
|
path('', login_required(MainView.as_view()), name='main'),
|
|
|
|
|
@@ -39,17 +36,11 @@ urlpatterns = [
|
|
|
name='partner_doc_upload'),
|
|
|
path('partner/doc/<str:doc_code>', login_required(PartnerDocView.as_view()), name='partner_doc'),
|
|
|
|
|
|
- path('transactions/<int:trans_id>/', trans_id, name='transid'),
|
|
|
- path('balance/', balance, name='balance'),
|
|
|
-
|
|
|
path('partners/', login_required(PartnersListView.as_view()), name='partners'),
|
|
|
- path('partners/change_status/', change_partners_status, name='partners/change_status'),
|
|
|
|
|
|
path('resource/', login_required(ResourceListView.as_view()), name='resource'),
|
|
|
- path('resource/change_status/', change_resource_status, name='resource/change_status'),
|
|
|
|
|
|
path('provider/', login_required(ProviderListView.as_view()), name='provider'),
|
|
|
- path('provider/change_status/', change_provider_status, name='provider/change_status'),
|
|
|
|
|
|
path('service_tariff/', login_required(ServiceTariffListView.as_view()), name='service_tariff'),
|
|
|
path('service_tariff/add/', login_required(ServiceTariffCreate.as_view()), name='service_tariff/add/'),
|
|
@@ -67,7 +58,6 @@ urlpatterns = [
|
|
|
name='service_information/edit/'),
|
|
|
|
|
|
path('service/', ServiceListView.as_view(), name='service'),
|
|
|
- path('service/change_status/', change_service_status, name='service/change_status'),
|
|
|
|
|
|
# path('partner_information/', login_required(PartnerInfoView.as_view()), name='partner_information/'),
|
|
|
# path('partner_information/add/', login_required(PartnerInformationCreate.as_view()), name='partner_information/add/'),
|
|
@@ -75,10 +65,7 @@ urlpatterns = [
|
|
|
|
|
|
path('user_information', login_required(UserListView.as_view()), name='user_information'),
|
|
|
|
|
|
- path('api/v1/auth/', include('djoser.urls.authtoken'), name="api-auth"),
|
|
|
- path('api/v1/platform/', include(router.urls), name="api-platform"),
|
|
|
- path('by_phone/<phone_number>/', get_user_by_phone_number, name='get_user_by_phone_number'),
|
|
|
-
|
|
|
+ # TODO: Посмотреть, может тоже нужно переместить
|
|
|
path('senderphone/', PhoneSender.as_view()),
|
|
|
|
|
|
# schemas
|
|
@@ -87,4 +74,27 @@ urlpatterns = [
|
|
|
path('schemav3/', schema_v3, name='schema'),
|
|
|
|
|
|
re_path(r'^redoc/$', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
|
|
+
|
|
|
+ # START Backend
|
|
|
+ # TODO: move to backend repo
|
|
|
+
|
|
|
+ # Регистрация / Вход / Выход
|
|
|
+ path('auth/signup/', ShariXSignUpView.as_view(), name="auth_signup"),
|
|
|
+ path('auth/login/', ShariXLoginView.as_view(), name='auth_login'),
|
|
|
+ path('auth/logout/', login_required(LogoutView.as_view()), name="auth_logout"),
|
|
|
+ path('auth/reset-password/', ShariXResetPasswordView.as_view(), name='auth_reset_password'),
|
|
|
+
|
|
|
+ path('transactions/<int:trans_id>/', trans_id, name='transid'),
|
|
|
+ path('balance/', balance, name='balance'),
|
|
|
+
|
|
|
+ path('partners/change_status/', change_partners_status, name='partners/change_status'),
|
|
|
+ path('resource/change_status/', change_resource_status, name='resource/change_status'),
|
|
|
+ path('provider/change_status/', change_provider_status, name='provider/change_status'),
|
|
|
+ path('service/change_status/', change_service_status, name='service/change_status'),
|
|
|
+
|
|
|
+ path('api/v1/auth/', include('djoser.urls.authtoken'), name="api-auth"),
|
|
|
+ path('api/v1/platform/', include(router.urls), name="api-platform"),
|
|
|
+ path('by_phone/<phone_number>/', get_user_by_phone_number, name='get_user_by_phone_number'),
|
|
|
+
|
|
|
+ # END Backend
|
|
|
]
|