Skip to content

Commit

Permalink
feat: begin work on manual search route
Browse files Browse the repository at this point in the history
  • Loading branch information
Sv443 committed Nov 18, 2024
1 parent 2f46541 commit 6c7238f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import packageJson from "../../package.json";
import { initSearchRoutes } from "./search";
import { initTranslationsRoutes } from "./translations";
import { initAlbumRoutes } from "./album";
import { initManualSearchRoutes } from "./manualSearch";

const routeFuncs: ((router: Router) => unknown)[] = [
initSearchRoutes,
initTranslationsRoutes,
initAlbumRoutes,
initManualSearchRoutes,
];

const router = Router();
Expand Down
14 changes: 14 additions & 0 deletions src/routes/manualSearch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Router } from "express";

export function initManualSearchRoutes(router: Router) {
router.get("/manual-search", (_req, res) => {
res.sendFile("index.html", {
root: "public",
dotfiles: "deny",
headers: {
"Content-Type": "text/html; charset=utf-8",
},
maxAge: 1000 * 60 * 60 * 24 * 7,
});
});
}

0 comments on commit 6c7238f

Please sign in to comment.