Open younghyunlee22 opened 2 weeks ago
Oh! Your suggestion sounds great to me. I looked up RESTful API conventions
and also asked my BF, CG.
Then, in my opinion, we should split the BookController into two controllers: booksController and bookController.
booksController then stands for the plural, i.e. books, and bookController stands for a book.
getAllBooks -> booksController (axios.get('/books'))
getBookById-> bookController (axios.get('/book/:bookId'))
Is that what you meant? we can discuss it :)
I noticed that we are currently using singular nouns for APIs managing user and book collections. I suggest using plural nouns for APIs that handle collections of resources. This indicates that the endpoint deals with multiple items or a collection, rather than a single item.
e.g.: app.use('/users', userController); app.use('/books', bookController);
I would appreciate your input!