added gallery section again

This commit is contained in:
2025-12-01 13:12:51 +01:00
parent 3404dabcca
commit cace0119c6
5 changed files with 14 additions and 4 deletions

View File

@@ -19,6 +19,16 @@ async function viewsRoutes(fastify: FastifyInstance) {
reply.type('text/html').send(stream);
});
fastify.get('/gallery', (req: FastifyRequest, reply: FastifyReply) => {
const stream = fs.createReadStream(path.join(__dirname, '..', '..', 'views', 'gallery.html'));
reply.type('text/html').send(stream);
});
fastify.get('/gallery/:extension/*', (req: FastifyRequest, reply: FastifyReply) => {
const stream = fs.createReadStream(path.join(__dirname, '..', '..', 'views', 'gallery-image.html'));
reply.type('text/html').send(stream);
});
fastify.get('/anime/:id', (req: FastifyRequest, reply: FastifyReply) => {
const stream = fs.createReadStream(path.join(__dirname, '..', '..', 'views', 'anime.html'));
reply.type('text/html').send(stream);