summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorThesourtimes <cckhmck@gmail.com>2021-12-18 15:19:07 +0300
committerThesourtimes <cckhmck@gmail.com>2021-12-18 15:19:07 +0300
commitb49d3fa266fc0571b82cbbbff7271dd4b48e583b (patch)
treeb0e58396d6cc3025930f48648e76d8d935d5b4b3 /util
parentAdd the new discovery route (diff)
downloadserver-b49d3fa266fc0571b82cbbbff7271dd4b48e583b.tar.xz
Improvements + dummy API configs
Diffstat (limited to 'util')
-rw-r--r--util/src/entities/Config.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/util/src/entities/Config.ts b/util/src/entities/Config.ts
index 079aa8bb..99e3537c 100644
--- a/util/src/entities/Config.ts
+++ b/util/src/entities/Config.ts
@@ -2,6 +2,7 @@ import { Column, Entity } from "typeorm";
 import { BaseClassWithoutId, PrimaryIdColumn } from "./BaseClass";
 import crypto from "crypto";
 import { Snowflake } from "../util/Snowflake";
+import { SessionsReplace } from "..";
 
 @Entity("config")
 export class ConfigEntity extends BaseClassWithoutId {
@@ -48,6 +49,11 @@ export interface ConfigValue {
 		endpointPublic: string | null;
 		endpointPrivate: string | null;
 	};
+	api: {
+		defaultVersion: string;
+		activeVersions: string[];
+		useFosscordEnhancements: boolean;
+	};
 	general: {
 		instanceName: string;
 		instanceDescription: string | null;
@@ -175,6 +181,9 @@ export interface ConfigValue {
 	},
 	client: {
 		useTestClient: Boolean;
+	},
+	metrics: {
+		timeout: number;
 	}
 }
 
@@ -189,6 +198,11 @@ export const DefaultConfigOptions: ConfigValue = {
 		endpointPrivate: null,
 		endpointPublic: null,
 	},
+	api: {
+		defaultVersion: "9",
+		activeVersions: ["6", "7", "8", "9"],
+		useFosscordEnhancements: true,
+	},
 	general: {
 		instanceName: "Fosscord Instance",
 		instanceDescription: "This is a Fosscord instance made in pre-relase days",
@@ -352,5 +366,8 @@ export const DefaultConfigOptions: ConfigValue = {
 	},
 	client: {
 		useTestClient: true
+	},
+	metrics: {
+		timeout: 30000
 	}
 };