refactor: remove redundant calls for getCurrentUser
This commit is contained in:
35 files changed
+651
-690
No files matched your search
+8
-46
@@ -16,7 +16,6 @@ import { Route as IndexImport } from './routes/index'
|
||||
import { Route as ErrorCodeImport } from './routes/error/$code'
|
||||
import { Route as ApiSearchImport } from './routes/_api/search'
|
||||
import { Route as ApiLoginImport } from './routes/_api/login'
|
||||
import { Route as ApiLibraryImport } from './routes/_api/library'
|
||||
import { Route as ApiSearchIndexImport } from './routes/_api/search/index'
|
||||
import { Route as ApiPlayerIndexImport } from './routes/_api/player/index'
|
||||
import { Route as ApiHomeIndexImport } from './routes/_api/home/index'
|
||||
@@ -65,11 +64,6 @@ const ApiLoginRoute = ApiLoginImport.update({
|
||||
getParentRoute: () => ApiRoute,
|
||||
} as any)
|
||||
|
||||
const ApiLibraryRoute = ApiLibraryImport.update({
|
||||
path: '/library',
|
||||
getParentRoute: () => ApiRoute,
|
||||
} as any)
|
||||
|
||||
const ApiSearchIndexRoute = ApiSearchIndexImport.update({
|
||||
path: '/',
|
||||
getParentRoute: () => ApiSearchRoute,
|
||||
@@ -136,8 +130,8 @@ const ApiLoginListRoute = ApiLoginListImport.update({
|
||||
} as any)
|
||||
|
||||
const ApiLibraryIdRoute = ApiLibraryIdImport.update({
|
||||
path: '/$id',
|
||||
getParentRoute: () => ApiLibraryRoute,
|
||||
path: '/library/$id',
|
||||
getParentRoute: () => ApiRoute,
|
||||
} as any)
|
||||
|
||||
const ApiItemIdRoute = ApiItemIdImport.update({
|
||||
@@ -188,13 +182,6 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof ApiImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
'/_api/library': {
|
||||
id: '/_api/library'
|
||||
path: '/library'
|
||||
fullPath: '/library'
|
||||
preLoaderRoute: typeof ApiLibraryImport
|
||||
parentRoute: typeof ApiImport
|
||||
}
|
||||
'/_api/login': {
|
||||
id: '/_api/login'
|
||||
path: '/login'
|
||||
@@ -253,10 +240,10 @@ declare module '@tanstack/react-router' {
|
||||
}
|
||||
'/_api/library/$id': {
|
||||
id: '/_api/library/$id'
|
||||
path: '/$id'
|
||||
path: '/library/$id'
|
||||
fullPath: '/library/$id'
|
||||
preLoaderRoute: typeof ApiLibraryIdImport
|
||||
parentRoute: typeof ApiLibraryImport
|
||||
parentRoute: typeof ApiImport
|
||||
}
|
||||
'/_api/login/list': {
|
||||
id: '/_api/login/list'
|
||||
@@ -361,18 +348,6 @@ declare module '@tanstack/react-router' {
|
||||
|
||||
// Create and export the route tree
|
||||
|
||||
interface ApiLibraryRouteChildren {
|
||||
ApiLibraryIdRoute: typeof ApiLibraryIdRoute
|
||||
}
|
||||
|
||||
const ApiLibraryRouteChildren: ApiLibraryRouteChildren = {
|
||||
ApiLibraryIdRoute: ApiLibraryIdRoute,
|
||||
}
|
||||
|
||||
const ApiLibraryRouteWithChildren = ApiLibraryRoute._addFileChildren(
|
||||
ApiLibraryRouteChildren,
|
||||
)
|
||||
|
||||
interface ApiLoginRouteChildren {
|
||||
ApiLoginListRoute: typeof ApiLoginListRoute
|
||||
ApiLoginManualRoute: typeof ApiLoginManualRoute
|
||||
@@ -402,7 +377,6 @@ const ApiSearchRouteWithChildren = ApiSearchRoute._addFileChildren(
|
||||
)
|
||||
|
||||
interface ApiRouteChildren {
|
||||
ApiLibraryRoute: typeof ApiLibraryRouteWithChildren
|
||||
ApiLoginRoute: typeof ApiLoginRouteWithChildren
|
||||
ApiSearchRoute: typeof ApiSearchRouteWithChildren
|
||||
ApiAlbumIdRoute: typeof ApiAlbumIdRoute
|
||||
@@ -410,6 +384,7 @@ interface ApiRouteChildren {
|
||||
ApiBoxsetIdRoute: typeof ApiBoxsetIdRoute
|
||||
ApiEpisodeIdRoute: typeof ApiEpisodeIdRoute
|
||||
ApiItemIdRoute: typeof ApiItemIdRoute
|
||||
ApiLibraryIdRoute: typeof ApiLibraryIdRoute
|
||||
ApiPersonIdRoute: typeof ApiPersonIdRoute
|
||||
ApiPlayerAudioRoute: typeof ApiPlayerAudioRoute
|
||||
ApiPlaylistIdRoute: typeof ApiPlaylistIdRoute
|
||||
@@ -420,7 +395,6 @@ interface ApiRouteChildren {
|
||||
}
|
||||
|
||||
const ApiRouteChildren: ApiRouteChildren = {
|
||||
ApiLibraryRoute: ApiLibraryRouteWithChildren,
|
||||
ApiLoginRoute: ApiLoginRouteWithChildren,
|
||||
ApiSearchRoute: ApiSearchRouteWithChildren,
|
||||
ApiAlbumIdRoute: ApiAlbumIdRoute,
|
||||
@@ -428,6 +402,7 @@ const ApiRouteChildren: ApiRouteChildren = {
|
||||
ApiBoxsetIdRoute: ApiBoxsetIdRoute,
|
||||
ApiEpisodeIdRoute: ApiEpisodeIdRoute,
|
||||
ApiItemIdRoute: ApiItemIdRoute,
|
||||
ApiLibraryIdRoute: ApiLibraryIdRoute,
|
||||
ApiPersonIdRoute: ApiPersonIdRoute,
|
||||
ApiPlayerAudioRoute: ApiPlayerAudioRoute,
|
||||
ApiPlaylistIdRoute: ApiPlaylistIdRoute,
|
||||
@@ -442,7 +417,6 @@ const ApiRouteWithChildren = ApiRoute._addFileChildren(ApiRouteChildren)
|
||||
export interface FileRoutesByFullPath {
|
||||
'/': typeof IndexRoute
|
||||
'': typeof ApiRouteWithChildren
|
||||
'/library': typeof ApiLibraryRouteWithChildren
|
||||
'/login': typeof ApiLoginRouteWithChildren
|
||||
'/search': typeof ApiSearchRouteWithChildren
|
||||
'/error/$code': typeof ErrorCodeRoute
|
||||
@@ -471,7 +445,6 @@ export interface FileRoutesByFullPath {
|
||||
export interface FileRoutesByTo {
|
||||
'/': typeof IndexRoute
|
||||
'': typeof ApiRouteWithChildren
|
||||
'/library': typeof ApiLibraryRouteWithChildren
|
||||
'/login': typeof ApiLoginRouteWithChildren
|
||||
'/error/$code': typeof ErrorCodeRoute
|
||||
'/album/$id': typeof ApiAlbumIdRoute
|
||||
@@ -500,7 +473,6 @@ export interface FileRoutesById {
|
||||
__root__: typeof rootRoute
|
||||
'/': typeof IndexRoute
|
||||
'/_api': typeof ApiRouteWithChildren
|
||||
'/_api/library': typeof ApiLibraryRouteWithChildren
|
||||
'/_api/login': typeof ApiLoginRouteWithChildren
|
||||
'/_api/search': typeof ApiSearchRouteWithChildren
|
||||
'/error/$code': typeof ErrorCodeRoute
|
||||
@@ -531,7 +503,6 @@ export interface FileRouteTypes {
|
||||
fullPaths:
|
||||
| '/'
|
||||
| ''
|
||||
| '/library'
|
||||
| '/login'
|
||||
| '/search'
|
||||
| '/error/$code'
|
||||
@@ -559,7 +530,6 @@ export interface FileRouteTypes {
|
||||
to:
|
||||
| '/'
|
||||
| ''
|
||||
| '/library'
|
||||
| '/login'
|
||||
| '/error/$code'
|
||||
| '/album/$id'
|
||||
@@ -586,7 +556,6 @@ export interface FileRouteTypes {
|
||||
| '__root__'
|
||||
| '/'
|
||||
| '/_api'
|
||||
| '/_api/library'
|
||||
| '/_api/login'
|
||||
| '/_api/search'
|
||||
| '/error/$code'
|
||||
@@ -657,7 +626,6 @@ export const routeTree = rootRoute
|
||||
"/_api": {
|
||||
"filePath": "_api.tsx",
|
||||
"children": [
|
||||
"/_api/library",
|
||||
"/_api/login",
|
||||
"/_api/search",
|
||||
"/_api/album/$id",
|
||||
@@ -665,6 +633,7 @@ export const routeTree = rootRoute
|
||||
"/_api/boxset/$id",
|
||||
"/_api/episode/$id",
|
||||
"/_api/item/$id",
|
||||
"/_api/library/$id",
|
||||
"/_api/person/$id",
|
||||
"/_api/player/audio",
|
||||
"/_api/playlist/$id",
|
||||
@@ -674,13 +643,6 @@ export const routeTree = rootRoute
|
||||
"/_api/player/"
|
||||
]
|
||||
},
|
||||
"/_api/library": {
|
||||
"filePath": "_api/library.tsx",
|
||||
"parent": "/_api",
|
||||
"children": [
|
||||
"/_api/library/$id"
|
||||
]
|
||||
},
|
||||
"/_api/login": {
|
||||
"filePath": "_api/login.tsx",
|
||||
"parent": "/_api",
|
||||
@@ -722,7 +684,7 @@ export const routeTree = rootRoute
|
||||
},
|
||||
"/_api/library/$id": {
|
||||
"filePath": "_api/library/$id.tsx",
|
||||
"parent": "/_api/library"
|
||||
"parent": "/_api"
|
||||
},
|
||||
"/_api/login/list": {
|
||||
"filePath": "_api/login/list.tsx",
|
||||
|
||||
Reference in new issue
Block a user