fix: user role not found
This commit is contained in:
parent
d587599c8a
commit
7c45663cd1
@ -21,7 +21,16 @@ export class NocoBaseClientPresetPlugin extends Plugin {
|
|||||||
return config;
|
return config;
|
||||||
});
|
});
|
||||||
this.app.pm.add(NocoBaseBuildInPlugin);
|
this.app.pm.add(NocoBaseBuildInPlugin);
|
||||||
|
try {
|
||||||
await this.loadRemotePlugin();
|
await this.loadRemotePlugin();
|
||||||
|
} catch (error) {
|
||||||
|
if (401 === error?.response?.status) {
|
||||||
|
this.app.apiClient.auth.setRole(null);
|
||||||
|
window.location.reload();
|
||||||
|
} else {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 现在是先远程加载远程组件的名称,然后再加载本地组件
|
// TODO: 现在是先远程加载远程组件的名称,然后再加载本地组件
|
||||||
|
Loading…
Reference in New Issue
Block a user