chore: cleanup

This commit is contained in:
2023-11-01 00:40:12 +09:00
parent 8f90daa840
commit c65bb7a992
56 changed files with 344 additions and 221 deletions

View File

@ -1,3 +1,4 @@
import { throwIfOffline } from "@snort/shared";
import { EventKind, EventPublisher } from "@snort/system";
import { ApiHost } from "Const";
import { SubscriptionType } from "Subscription";
@ -131,6 +132,7 @@ export default class SnortApi {
body?: object,
headers?: { [key: string]: string },
): Promise<T> {
throwIfOffline();
const rsp = await fetch(`${this.#url}${path}`, {
method: method,
body: body ? JSON.stringify(body) : undefined,