Don't make service spec request on basic types
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1711a4736e
commit
3d75a068dc
|
@ -10,9 +10,13 @@ export async function listServiceSpecs(): Promise<Record<string, ServiceInfos>>
|
|||
}
|
||||
|
||||
export async function getServiceSpec(ssid: string): Promise<ServiceSpec> {
|
||||
const res = await fetch(`/api/service_specs/` + ssid, {
|
||||
method: 'GET',
|
||||
headers: {'Accept': 'application/json'},
|
||||
});
|
||||
return await handleApiResponse<ServiceSpec>(res);
|
||||
if (ssid == "string") {
|
||||
return Promise.resolve(new ServiceSpec({}));
|
||||
} else {
|
||||
const res = await fetch(`/api/service_specs/` + ssid, {
|
||||
method: 'GET',
|
||||
headers: {'Accept': 'application/json'},
|
||||
});
|
||||
return await handleApiResponse<ServiceSpec>(res);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user