20d7f5b ←c2533b8antonApr 11, 2026 api

edit api.ts via macOS

M /sublimated/undefined +6 -3
24 unmodified lines
25export class SublimatedApi {
26 constructor(private token: string) {}
27
28 private async request<T>(path: string): Promise<T> {
29 const headers: Record<string, string> = {
30 Accept: "application/json",
31 };
32 if (this.token) {
33 headers.Authorization = `Bearer ${this.token}`;
34 }
35 const response = await requestUrl({
36 url: `${API_BASE}${path}`,
31 headers: {
32 Authorization: `Bearer ${this.token}`,
33 Accept: "application/json",
34 },
37 headers,
38 });
39
40 if (response.status >= 400) {
41 throw new Error(
31 unmodified lines