diff --git a/.changeset/cyan-nails-brake.md b/.changeset/cyan-nails-brake.md index fbbc97b464..93c004f07a 100644 --- a/.changeset/cyan-nails-brake.md +++ b/.changeset/cyan-nails-brake.md @@ -1,5 +1,6 @@ --- "@scow/portal-web": patch +"@scow/mis-web": patch --- -修复门户系统桌面功能页面 token 过期不能跳转登录页面的问题 +修复门户系统桌面功能页面 token 过期不能跳转登录页面的问题, 修改获取集群数据token验证失败时的返回 diff --git a/apps/mis-web/src/pages/api/admin/getClustersRuntimeInfo.ts b/apps/mis-web/src/pages/api/admin/getClustersRuntimeInfo.ts index bf75123339..c35d0de6f4 100644 --- a/apps/mis-web/src/pages/api/admin/getClustersRuntimeInfo.ts +++ b/apps/mis-web/src/pages/api/admin/getClustersRuntimeInfo.ts @@ -35,7 +35,6 @@ export const GetClustersRuntimeInfoSchema = typeboxRouteSchema({ 200: Type.Object({ results: Type.Array(ClusterRuntimeInfoSchema), }), - }, }); @@ -48,7 +47,7 @@ export default route(GetClustersRuntimeInfoSchema, // when firstly used in getInitialProps, check the token // when logged in, use auth() const info = token ? await validateToken(token) : await auth(req, res); - if (!info) { return { 403: null }; } + if (!info) { return; } const client = getClient(ConfigServiceClient); const result = await asyncClientCall(client, "getClustersRuntimeInfo", {}); diff --git a/apps/mis-web/src/pages/api/clusterConfigsInfo.ts b/apps/mis-web/src/pages/api/clusterConfigsInfo.ts index a614239c55..8af71b648a 100644 --- a/apps/mis-web/src/pages/api/clusterConfigsInfo.ts +++ b/apps/mis-web/src/pages/api/clusterConfigsInfo.ts @@ -43,8 +43,6 @@ export const getClusterConfigFilesSchema = typeboxRouteSchema({ 200: Type.Object({ clusterConfigs: Type.Record(Type.String(), ClusterConfigSchema) }), - - 403: Type.Null(), }, }); @@ -58,7 +56,7 @@ export default route(getClusterConfigFilesSchema, // when firstly used in getInitialProps, check the token // when logged in, use auth() const info = token ? await validateToken(token) : await auth(req, res); - if (!info) { return { 403: null }; } + if (!info) { return; } const modifiedClusters: Record = await getClusterConfigFiles();