Add endpoint for getting config
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e814aacb86
commit
39628e6175
@ -6,6 +6,7 @@ import Login from "./user/login";
|
||||
import ClientRouter from "./client";
|
||||
import * as cors from "cors";
|
||||
import OAuthRoute from "./oauth";
|
||||
import config from "../config";
|
||||
|
||||
const ApiRouter: express.IRouter = express.Router();
|
||||
ApiRouter.use("/admin", AdminRoute);
|
||||
@ -22,4 +23,11 @@ ApiRouter.use("/", ClientRouter);
|
||||
// Legacy reasons (deprecated)
|
||||
ApiRouter.post("/login", Login);
|
||||
|
||||
ApiRouter.get("/config.json", (req, res) => {
|
||||
return res.json({
|
||||
name: config.core.name,
|
||||
url: config.core.url,
|
||||
});
|
||||
});
|
||||
|
||||
export default ApiRouter;
|
||||
|
Loading…
Reference in New Issue
Block a user