diff --git a/src/views/views.routes.ts b/src/views/views.routes.ts index 9877a25..11cd26b 100644 --- a/src/views/views.routes.ts +++ b/src/views/views.routes.ts @@ -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); diff --git a/views/books.html b/views/books.html index 11f88f7..8a41840 100644 --- a/views/books.html +++ b/views/books.html @@ -22,7 +22,7 @@ - + diff --git a/views/gallery-image.html b/views/gallery-image.html index dc49fe4..6a2cb1a 100644 --- a/views/gallery-image.html +++ b/views/gallery-image.html @@ -24,7 +24,7 @@ - + diff --git a/views/gallery.html b/views/gallery.html index 06363df..7d0840f 100644 --- a/views/gallery.html +++ b/views/gallery.html @@ -25,7 +25,7 @@ - + diff --git a/views/index.html b/views/index.html index 1144918..5599a89 100644 --- a/views/index.html +++ b/views/index.html @@ -21,7 +21,7 @@ - +