organisation & minor fixes
This commit is contained in:
14
src/api/books/books.routes.ts
Normal file
14
src/api/books/books.routes.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user