fix: cannot reach api endpoint

This commit is contained in:
Methapon2001 2023-11-30 10:06:54 +07:00
parent 5bc3d5580e
commit c6f92c0f77
No known key found for this signature in database
GPG key ID: 849924FEF46BD132

View file

@ -27,8 +27,7 @@ RegisterRoutes(router);
app.use(swaggerSpecs.basePath, router);
app.use(errorHandler);
app.use(express.static("static"));
app.get("*", (_req, res) => {
app.use((_req, res, _next) => {
res.sendFile(`${process.cwd()}/static/index.html`);
});