Leah-Harden / BookWyrm

1 stars 0 forks source link

api routes #7

Open Leah-Harden opened 1 year ago

Norboro1 commented 1 year ago

15 Set up Homepage Get route for searching books, User will be able to enter a title to search for, and then browse through pages of results. Once the handlebars page is set up it should be just some simple changes to get it to render the results of the search to the page. The page will use its own script to send a get request to the server upon searching and upon changing pages.

I will also need to add a Post route so that users can add books to their collection directly from the search results, which means the book cards made in handlebars will need a button to do so in addition to their other properties: title, author, isbn, cover photo, and page count.

We will eventually need a route for whatever page displays the users book collection to pull that data from the db and render it to the page.

Off the top of my head we will need routes for the following: collection page (GET from db), active reading page (POST for when they either finish reading for now, or finish the book), and user routes (for login and signup). The collection and active reading can potentially be in the same route.js file like "/myAccount/collection" and "/myAccount/Reading"