feat: query layers

This commit is contained in:
Qiuxia Fan
2022-01-14 12:27:09 +08:00
parent 3e4f595c86
commit 3eef246d1d
5 changed files with 35 additions and 13 deletions

View File

@@ -33,7 +33,7 @@ export const selectorStore = defineStore({
async fetchLayers(): Promise<AxiosResponse> {
const res: AxiosResponse = await graph.query("queryLayers").params({});
return res;
return res.data || {};
},
async fetchServices(layer: string): Promise<AxiosResponse> {
const res: AxiosResponse = await graph
@@ -43,7 +43,7 @@ export const selectorStore = defineStore({
if (!res.data.errors) {
this.services = res.data.data.services;
}
return res;
return res.data;
},
async getServiceInstances(params: {
serviceId: string;