mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-12 21:52:40 +01:00
Fix redirect when test client disabled
This commit is contained in:
parent
22fb62673a
commit
b47b6de102
@ -11,14 +11,14 @@ export default function TestClient(app: Application) {
|
||||
app.use("/assets", express.static(path.join(ASSET_FOLDER_PATH, "public")));
|
||||
app.use("/assets", express.static(path.join(ASSET_FOLDER_PATH, "cache")));
|
||||
|
||||
app.get("*", (req, res, next) => {
|
||||
if (Config.get().client.useTestClient) return next();
|
||||
|
||||
return res.redirect("/api/ping")
|
||||
})
|
||||
|
||||
// Test client is disabled, so don't need to run any more. Above should probably be moved somewhere?
|
||||
if (!Config.get().client.useTestClient) return;
|
||||
if (!Config.get().client.useTestClient) {
|
||||
app.get("*", (req, res) => {
|
||||
return res.redirect("/api/ping");
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const agent = new ProxyAgent();
|
||||
|
||||
|
@ -4,5 +4,4 @@ export class GuildDefaults {
|
||||
afkTimeout: number = 300;
|
||||
defaultMessageNotifications: number = 1;
|
||||
explicitContentFilter: number = 0;
|
||||
test: number = 123;
|
||||
}
|
Loading…
Reference in New Issue
Block a user