chore: Minor refinements
This commit is contained in:
@@ -84,10 +84,6 @@ app.get("/status", async (_: Request, res: Response) => {
|
||||
}
|
||||
})
|
||||
|
||||
app.get("/posts/viewer/redirect", (_: Request, res: Response) => {
|
||||
res.redirect(302, "/viewer");
|
||||
})
|
||||
|
||||
app.post("/report", async (req: Request, res: Response): Promise<any> => {
|
||||
const { class: className, location, content } = req.body;
|
||||
if (!className || !location || !content) {
|
||||
@@ -145,6 +141,10 @@ if (SERVE_WEB) {
|
||||
return handle(req, res)
|
||||
})
|
||||
|
||||
app.get("/posts/viewer/redirect", (_: Request, res: Response) => {
|
||||
res.redirect(302, "/viewer");
|
||||
})
|
||||
|
||||
app.use(express.static(path.join(process.cwd(), 'web/public'), {
|
||||
index: 'index.html',
|
||||
extensions: ['html'],
|
||||
|
||||
Reference in New Issue
Block a user