disable matrix layer by default

This commit is contained in:
hippoz 2022-10-30 01:14:39 +03:00
parent 49d8032638
commit 53689fdaf6
No known key found for this signature in database
GPG key ID: 7C52899193467641

View file

@ -5,13 +5,17 @@ import messagesRouter from "./routes/api/v1/messages";
import matrixRouter from "./routes/matrix";
import { errors } from "./errors";
const ENABLE_MATRIX_LAYER = false;
export default function(app: Application) {
app.use(json());
app.use("/api/v1/users", usersRouter);
app.use("/api/v1/channels", channelsRouter);
app.use("/api/v1/messages", messagesRouter);
app.use("/", express.static("frontend/public"));
app.use("/", matrixRouter);
if (ENABLE_MATRIX_LAYER) {
app.use("/", matrixRouter);
}
const errorHandler: ErrorRequestHandler = (error, req, res, next) => {
console.error("error: while handling request", error);