Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Books API by Helene Westrin #526

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

HeleneWestrin
Copy link

Vercel link

Test the API »

Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well structured and quite advanced project, nice that you broke it up into chunks and dared to go further than the requirements! Love your eagerness as well, it's not until next week we're working with POST requests 😉

};

// Add a new book
export const addBook = (req, res) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, ambitious ⭐

Comment on lines +21 to +23
const saveBooks = (books) => {
fs.writeFileSync(booksFilePath, JSON.stringify(books, null, 2));
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to change the books.json file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Matilda! ☺️🙏
Yes, it writes to books.json and adds the new book at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants