Improvements + dummy API configs

This commit is contained in:
Thesourtimes
2021-12-18 15:19:07 +03:00
parent 0d16ae1da4
commit b49d3fa266
3 changed files with 41 additions and 1 deletions
+17
View File
@@ -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
}
};