mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-19 15:56:05 +01:00
wip
This commit is contained in:
@@ -1,23 +1,17 @@
|
||||
from django.urls import path, re_path, include
|
||||
from rest_framework import routers
|
||||
from django.urls import path, include
|
||||
|
||||
from . import api
|
||||
from . import views
|
||||
|
||||
|
||||
router = routers.DefaultRouter(trailing_slash=False)
|
||||
router.register('api/1/configs', api.ConfigViewSet)
|
||||
router.register('api/1/versions', api.AppVersionViewSet, basename='app-versions')
|
||||
|
||||
urlpatterns = [
|
||||
path('api/1/auth/logout', api.LogoutView.as_view()),
|
||||
path('api/1/user', api.UserViewSet.as_view({'get': 'retrieve', 'put': 'update'})),
|
||||
path('api/1/instance-info', api.InstanceInfoViewSet.as_view({'get': 'retrieve'})),
|
||||
path('api/1/gateways/choose', api.ChooseGatewayViewSet.as_view({'post': 'retrieve'})),
|
||||
|
||||
re_path('^(|login|app|about|features)$', views.IndexView.as_view()),
|
||||
path('terminal', views.TerminalView.as_view()),
|
||||
*[
|
||||
path(p, views.IndexView.as_view())
|
||||
for p in ['', 'login', 'app', 'about', 'features']
|
||||
],
|
||||
|
||||
path('app-dist/<version>/<path:path>', views.AppDistView.as_view()),
|
||||
path('', include(router.urls)),
|
||||
path('terminal', views.TerminalView.as_view()),
|
||||
|
||||
path('', include(api.urlpatterns)),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user