added book entries from extensions

This commit is contained in:
2025-11-28 21:08:25 +01:00
parent 791cb8f806
commit 03ebb5d88e
8 changed files with 179 additions and 73 deletions

View File

@@ -28,7 +28,12 @@ async function viewsRoutes(fastify, options) {
reply.type('text/html').send(stream);
});
fastify.get('/read/:id/:chapter/:provider', (req, reply) => {
fastify.get('/book/:extension/*', (req, reply) => {
const stream = fs.createReadStream(path.join(__dirname, '..', '..', 'views', 'book.html'));
reply.type('text/html').send(stream);
});
fastify.get('/read/:provider/:chapter/*', (req, reply) => {
const stream = fs.createReadStream(path.join(__dirname, '..', '..', 'views', 'read.html'));
reply.type('text/html').send(stream);
});