mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 12:35:46 +00:00
rewrite url structure
This commit is contained in:
@ -10,6 +10,7 @@ from django.urls import include, path, re_path
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.views.generic.base import RedirectView
|
||||
|
||||
from allauth.headless.urls import Client, build_urlpatterns
|
||||
from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView
|
||||
from sesame.views import LoginView
|
||||
|
||||
@ -99,6 +100,12 @@ apipatterns = [
|
||||
users.api.LoginRedirect.as_view(),
|
||||
name='api-login-redirect',
|
||||
),
|
||||
path(
|
||||
'',
|
||||
include(
|
||||
(build_urlpatterns(Client.BROWSER), 'headless'), namespace='browser'
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
path('_allauth/', include('allauth.headless.urls')),
|
||||
|
@ -19,14 +19,14 @@ export enum ApiEndpoints {
|
||||
user_reset = 'auth/password/reset/', // TODO change
|
||||
user_reset_set = 'auth/password/reset/confirm/', // TODO change
|
||||
user_change_password = 'auth/password/change/', // TODO change
|
||||
user_sso = '_allauth/browser/v1/account/providers',
|
||||
user_login = '_allauth/browser/v1/auth/login',
|
||||
user_login_mfa = '_allauth/browser/v1/auth/2fa/authenticate',
|
||||
user_logout = '_allauth/browser/v1/auth/session',
|
||||
user_sso = 'auth/v1/account/providers',
|
||||
user_login = 'auth/v1/auth/login',
|
||||
user_login_mfa = 'auth/v1/auth/2fa/authenticate',
|
||||
user_logout = 'auth/v1/auth/session',
|
||||
user_register = 'auth/registration/', // TODO change
|
||||
user_mfa = '_allauth/browser/v1/account/authenticators',
|
||||
user_emails = '_allauth/browser/v1/account/email',
|
||||
login_provider_redirect = '_allauth/browser/v1/auth/provider/redirect',
|
||||
user_mfa = 'auth/v1/account/authenticators',
|
||||
user_emails = 'auth/v1/account/email',
|
||||
login_provider_redirect = 'auth/v1/auth/provider/redirect',
|
||||
|
||||
// Generic API endpoints
|
||||
currency_list = 'currency/exchange/',
|
||||
@ -50,7 +50,7 @@ export enum ApiEndpoints {
|
||||
icons = 'icons/',
|
||||
selectionlist_list = 'selection/',
|
||||
selectionlist_detail = 'selection/:id/',
|
||||
securtiy_settings = '_allauth/browser/v1/config',
|
||||
securtiy_settings = 'auth/v1/config',
|
||||
|
||||
// Barcode API endpoints
|
||||
barcode = 'barcode/',
|
||||
|
@ -71,9 +71,7 @@ export const test = baseTest.extend({
|
||||
url != 'http://localhost:8000/this/does/not/exist.js' &&
|
||||
url != 'http://localhost:8000/api/user/me/' &&
|
||||
url != 'http://localhost:8000/api/user/token/' &&
|
||||
url != 'http://localhost:8000/api/_allauth/browser/v1/auth/login' &&
|
||||
url != 'http://localhost:8000/api/auth/v1/auth/login' &&
|
||||
url != 'http://localhost:8000/api/_allauth/browser/v1/auth/session' &&
|
||||
url != 'http://localhost:8000/api/auth/v1/auth/session' &&
|
||||
url != 'http://localhost:8000/api/barcode/' &&
|
||||
url != 'https://docs.inventree.org/en/versions.json' &&
|
||||
|
Reference in New Issue
Block a user