feat(users): add user admin section and delegate login authorization to API
This commit is contained in:
@@ -21,6 +21,7 @@ import { Route as AuthedDimzouTranslationsRouteImport } from './routes/_authed/d
|
||||
import { Route as AuthedDevicesRouteImport } from './routes/_authed/devices'
|
||||
import { Route as AuthedCommentReportsRouteImport } from './routes/_authed/comment-reports'
|
||||
import { Route as AuthedAdminUsersRouteImport } from './routes/_authed/admin-users'
|
||||
import { Route as AuthedUsersIndexRouteImport } from './routes/_authed/users/index'
|
||||
import { Route as AuthedCategoriesIndexRouteImport } from './routes/_authed/categories/index'
|
||||
import { Route as AuthedStudioSubtopicsRouteImport } from './routes/_authed/studio/subtopics'
|
||||
import { Route as AuthedStudioStylePresetsRouteImport } from './routes/_authed/studio/style-presets'
|
||||
@@ -97,6 +98,11 @@ const AuthedAdminUsersRoute = AuthedAdminUsersRouteImport.update({
|
||||
path: '/admin-users',
|
||||
getParentRoute: () => AuthedRoute,
|
||||
} as any)
|
||||
const AuthedUsersIndexRoute = AuthedUsersIndexRouteImport.update({
|
||||
id: '/users/',
|
||||
path: '/users/',
|
||||
getParentRoute: () => AuthedRoute,
|
||||
} as any)
|
||||
const AuthedCategoriesIndexRoute = AuthedCategoriesIndexRouteImport.update({
|
||||
id: '/categories/',
|
||||
path: '/categories/',
|
||||
@@ -204,6 +210,7 @@ export interface FileRoutesByFullPath {
|
||||
'/studio/style-presets': typeof AuthedStudioStylePresetsRoute
|
||||
'/studio/subtopics': typeof AuthedStudioSubtopicsRoute
|
||||
'/categories/': typeof AuthedCategoriesIndexRoute
|
||||
'/users/': typeof AuthedUsersIndexRoute
|
||||
}
|
||||
export interface FileRoutesByTo {
|
||||
'/login': typeof LoginRoute
|
||||
@@ -232,6 +239,7 @@ export interface FileRoutesByTo {
|
||||
'/studio/style-presets': typeof AuthedStudioStylePresetsRoute
|
||||
'/studio/subtopics': typeof AuthedStudioSubtopicsRoute
|
||||
'/categories': typeof AuthedCategoriesIndexRoute
|
||||
'/users': typeof AuthedUsersIndexRoute
|
||||
}
|
||||
export interface FileRoutesById {
|
||||
__root__: typeof rootRouteImport
|
||||
@@ -262,6 +270,7 @@ export interface FileRoutesById {
|
||||
'/_authed/studio/style-presets': typeof AuthedStudioStylePresetsRoute
|
||||
'/_authed/studio/subtopics': typeof AuthedStudioSubtopicsRoute
|
||||
'/_authed/categories/': typeof AuthedCategoriesIndexRoute
|
||||
'/_authed/users/': typeof AuthedUsersIndexRoute
|
||||
}
|
||||
export interface FileRouteTypes {
|
||||
fileRoutesByFullPath: FileRoutesByFullPath
|
||||
@@ -292,6 +301,7 @@ export interface FileRouteTypes {
|
||||
| '/studio/style-presets'
|
||||
| '/studio/subtopics'
|
||||
| '/categories/'
|
||||
| '/users/'
|
||||
fileRoutesByTo: FileRoutesByTo
|
||||
to:
|
||||
| '/login'
|
||||
@@ -320,6 +330,7 @@ export interface FileRouteTypes {
|
||||
| '/studio/style-presets'
|
||||
| '/studio/subtopics'
|
||||
| '/categories'
|
||||
| '/users'
|
||||
id:
|
||||
| '__root__'
|
||||
| '/_authed'
|
||||
@@ -349,6 +360,7 @@ export interface FileRouteTypes {
|
||||
| '/_authed/studio/style-presets'
|
||||
| '/_authed/studio/subtopics'
|
||||
| '/_authed/categories/'
|
||||
| '/_authed/users/'
|
||||
fileRoutesById: FileRoutesById
|
||||
}
|
||||
export interface RootRouteChildren {
|
||||
@@ -442,6 +454,13 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof AuthedAdminUsersRouteImport
|
||||
parentRoute: typeof AuthedRoute
|
||||
}
|
||||
'/_authed/users/': {
|
||||
id: '/_authed/users/'
|
||||
path: '/users'
|
||||
fullPath: '/users/'
|
||||
preLoaderRoute: typeof AuthedUsersIndexRouteImport
|
||||
parentRoute: typeof AuthedRoute
|
||||
}
|
||||
'/_authed/categories/': {
|
||||
id: '/_authed/categories/'
|
||||
path: '/categories'
|
||||
@@ -576,6 +595,7 @@ interface AuthedRouteChildren {
|
||||
AuthedStudioStylePresetsRoute: typeof AuthedStudioStylePresetsRoute
|
||||
AuthedStudioSubtopicsRoute: typeof AuthedStudioSubtopicsRoute
|
||||
AuthedCategoriesIndexRoute: typeof AuthedCategoriesIndexRoute
|
||||
AuthedUsersIndexRoute: typeof AuthedUsersIndexRoute
|
||||
}
|
||||
|
||||
const AuthedRouteChildren: AuthedRouteChildren = {
|
||||
@@ -604,6 +624,7 @@ const AuthedRouteChildren: AuthedRouteChildren = {
|
||||
AuthedStudioStylePresetsRoute: AuthedStudioStylePresetsRoute,
|
||||
AuthedStudioSubtopicsRoute: AuthedStudioSubtopicsRoute,
|
||||
AuthedCategoriesIndexRoute: AuthedCategoriesIndexRoute,
|
||||
AuthedUsersIndexRoute: AuthedUsersIndexRoute,
|
||||
}
|
||||
|
||||
const AuthedRouteWithChildren =
|
||||
|
||||
Reference in New Issue
Block a user