[UI] inactive domain

This commit is contained in:
xue jiahao
2024-11-25 10:45:44 +08:00
parent cc726c7f68
commit 7a1ff8ac30
3 changed files with 92 additions and 20 deletions

View File

@@ -76,11 +76,13 @@ export const useAuthStore = defineStore('auth', {
async getUserDomains(): Promise<IDomainInfo[]> {
const resp = await api.get(`api/domain`);
const domains = resp.data as any[];
return domains.map((data) => ({
id: data.id,
domainName: data.name,
kintoneUrl: data.url,
}));
return domains
.filter(data => data.is_active)
.map((data) => ({
id: data.id,
domainName: data.name,
kintoneUrl: data.url,
}));
},
async getUserInfo():Promise<UserInfo>{
const resp = (await api.get(`api/v1/users/me`)).data;