Add '/blocked_services/services' API

This commit is contained in:
RoboMagus
2022-04-25 09:41:31 +02:00
committed by GitHub
parent 82af43039c
commit 0f2a9f262e
6 changed files with 76 additions and 0 deletions

View File

@@ -1,6 +1,18 @@
// This file was autogenerated. Please do not change.
// All changes will be overwrited on commit.
export default class BlockedServicesApi {
static async blockedServicesAvailableServices(): Promise<string[] | Error> {
return await fetch(`/control/blocked_services/services`, {
method: 'GET',
}).then(async (res) => {
if (res.status === 200) {
return res.json();
} else {
return new Error(String(res.status));
}
})
}
static async blockedServicesList(): Promise<string[] | Error> {
return await fetch(`/control/blocked_services/list`, {
method: 'GET',