Skip to content

Commit

Permalink
fix: ReferenceError
Browse files Browse the repository at this point in the history
  • Loading branch information
SALTWOOD committed Sep 15, 2024
1 parent 42c15af commit 21ee4cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/Utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ export const FileListSchema = avsc.Type.forSchema({
})

export class Utilities {
public static got: Got = got.extend({
headers: {
'User-Agent': `93AtHome-V3/${Config.version}`
}
});
public static got: Got = got;

public static isRunningInDocker(): boolean {
return process.env.IS_IN_DOCKER === 'true';
Expand Down
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { exec } from "child_process";
import { Config } from './Config.js';
import { Server } from './Server.js';
import { Utilities } from './Utilities.js';
import got from "got";

function onStop(signal: string) {
server.db.close();
Expand All @@ -10,6 +11,11 @@ function onStop(signal: string) {
}

Config.init();
Utilities.got = got.extend({
headers: {
'User-Agent': `93AtHome-V3/${Config.version}`
}
});

if (Utilities.isRunningInDocker()) {
console.debug("Running in Docker container");
Expand Down

0 comments on commit 21ee4cb

Please sign in to comment.