mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-06 10:52:31 +01:00
Fix the minor issues on route
This commit is contained in:
parent
312e459337
commit
17684a14fd
@ -11,7 +11,9 @@ export const NO_AUTHORIZATION_ROUTES = [
|
||||
"/experiments",
|
||||
"/-/readyz",
|
||||
"/-/healthz",
|
||||
"/policies/instance/",
|
||||
"/science",
|
||||
"/track",
|
||||
"/policies/instance",
|
||||
/\/guilds\/\d+\/widget\.(json|png)/
|
||||
];
|
||||
|
||||
|
@ -3,14 +3,16 @@ import { route } from "@fosscord/api";
|
||||
import { Config } from "@fosscord/util";
|
||||
import { config } from "dotenv"
|
||||
const router = Router();
|
||||
const { cdn } = Config.get();
|
||||
|
||||
const IdentityForm = {
|
||||
cdn: cdn.endpointPublic || process.env.CDN || "http://localhost:3001",
|
||||
}
|
||||
|
||||
router.get("/",route({}), async (req: Request, res: Response) => {
|
||||
res.json(IdentityForm)
|
||||
const { cdn, gateway } = Config.get();
|
||||
|
||||
const IdentityForm = {
|
||||
cdn: cdn.endpointPublic || process.env.CDN || "http://localhost:3001",
|
||||
gateway: gateway.endpointPublic || process.env.GATEWAY || "ws://localhost:3002"
|
||||
};
|
||||
|
||||
res.json(IdentityForm);
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { Router, Request, Response } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
import { Config } from "@fosscord/util";
|
||||
|
||||
const router = Router();
|
||||
const { general } = Config.get();
|
||||
|
||||
|
||||
router.get("/",route({}), async (req: Request, res: Response) => {
|
||||
res.json(general)
|
||||
const { general } = Config.get();
|
||||
res.json(general);
|
||||
});
|
||||
|
||||
export default router;
|
@ -2,10 +2,10 @@ import { Router, Request, Response } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
import { Config } from "@fosscord/util";
|
||||
const router = Router();
|
||||
const { limits } = Config.get();
|
||||
|
||||
router.get("/",route({}), async (req: Request, res: Response) => {
|
||||
res.json(limits)
|
||||
const { limits } = Config.get();
|
||||
res.json(limits);
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
@ -52,6 +52,7 @@ export interface ConfigValue {
|
||||
instanceName: string;
|
||||
instanceDescription: string | null;
|
||||
frontPage: string | null;
|
||||
tosPage: string | null;
|
||||
image: string | null;
|
||||
instanceId: string;
|
||||
};
|
||||
@ -187,6 +188,7 @@ export const DefaultConfigOptions: ConfigValue = {
|
||||
instanceName: "Fosscord Instance",
|
||||
instanceDescription: "This is a Fosscord instance made in pre-relase days",
|
||||
frontPage: null,
|
||||
tosPage: null,
|
||||
image: null,
|
||||
instanceId: Snowflake.generate(),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user