aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/server/ServerApi.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/server/ServerApi.ts')
-rw-r--r--src/api/server/ServerApi.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/server/ServerApi.ts b/src/api/server/ServerApi.ts
index 77a759b3e..8b551ade2 100644
--- a/src/api/server/ServerApi.ts
+++ b/src/api/server/ServerApi.ts
@@ -25,7 +25,7 @@ import { SERVER_NOT_LOADED } from '../../config';
25import { userDataRecipesPath, userDataPath } from '../../environment-remote'; 25import { userDataRecipesPath, userDataPath } from '../../environment-remote';
26import { asarRecipesPath } from '../../helpers/asar-helpers'; 26import { asarRecipesPath } from '../../helpers/asar-helpers';
27import apiBase from '../apiBase'; 27import apiBase from '../apiBase';
28import { prepareAuthRequest, sendAuthRequest } from '../utils/auth'; 28import { prepareAuthRequest, prepareLocalToken, sendAuthRequest } from '../utils/auth';
29 29
30import { 30import {
31 getRecipeDirectory, 31 getRecipeDirectory,
@@ -246,6 +246,8 @@ export default class ServerApi {
246 246
247 delete requestData.headers['Content-Type']; 247 delete requestData.headers['Content-Type'];
248 248
249 await prepareLocalToken(requestData);
250
249 const request = await window.fetch( 251 const request = await window.fetch(
250 `${apiBase()}/service/${serviceId}`, 252 `${apiBase()}/service/${serviceId}`,
251 // @ts-expect-error Argument of type '{ method: string; } & { mode: string; headers: any; }' is not assignable to parameter of type 'RequestInit | undefined'. 253 // @ts-expect-error Argument of type '{ method: string; } & { mode: string; headers: any; }' is not assignable to parameter of type 'RequestInit | undefined'.