feat(projects): @sa/axios: createRequest, createFlatRequest, createHookRequest

This commit is contained in:
Soybean
2024-01-16 01:50:12 +08:00
parent fbf4cc430d
commit bac1632457
26 changed files with 672 additions and 75 deletions

View File

@ -167,17 +167,19 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
/** Init dynamic auth route */
async function initDynamicAuthRoute() {
const {
data: { routes, home }
} = await fetchGetUserRoutes();
const { data, error } = await fetchGetUserRoutes();
handleAuthRoutes(routes);
if (!error) {
const { routes, home } = data;
setRouteHome(home);
handleAuthRoutes(routes);
handleUpdateRootRouteRedirect(home);
setRouteHome(home);
setIsInitAuthRoute(true);
handleUpdateRootRouteRedirect(home);
setIsInitAuthRoute(true);
}
}
/**