fix api call result
This commit is contained in:
@@ -66,24 +66,13 @@ export const useAuthStore = defineStore('auth', {
|
||||
},
|
||||
async getCurrentDomain(): Promise<IDomainInfo> {
|
||||
const resp = await api.get(`api/activedomain`);
|
||||
const activedomain = resp?.data;
|
||||
const activedomain = resp?.data?.data;
|
||||
return {
|
||||
id: activedomain?.id,
|
||||
domainName: activedomain?.name,
|
||||
kintoneUrl: activedomain?.url,
|
||||
};
|
||||
},
|
||||
async getUserDomains(): Promise<IDomainInfo[]> {
|
||||
const resp = await api.get(`api/domain`);
|
||||
const domains = resp.data as any[];
|
||||
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;
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user