Files
WaifuBoard/src/api/books/books.routes.ts
2025-12-03 17:24:24 +01:00

14 lines
631 B
TypeScript

import { FastifyInstance } from 'fastify';
import * as controller from './books.controller';
async function booksRoutes(fastify: FastifyInstance) {
fastify.get('/book/:id', controller.getBook);
fastify.get('/books/trending', controller.getTrending);
fastify.get('/books/popular', controller.getPopular);
fastify.get('/search/books', controller.searchBooks);
fastify.get('/search/books/:extension', controller.searchBooksInExtension);
fastify.get('/book/:id/chapters', controller.getChapters);
fastify.get('/book/:bookId/:chapter/:provider', controller.getChapterContent);
}
export default booksRoutes;