Skip to content

project-19-happy-thoughts-api#514

Open
erikamolsson wants to merge 8 commits intoTechnigo:masterfrom
erikamolsson:master
Open

project-19-happy-thoughts-api#514
erikamolsson wants to merge 8 commits intoTechnigo:masterfrom
erikamolsson:master

Conversation

@erikamolsson
Copy link

@HIPPIEKICK HIPPIEKICK self-assigned this Jan 9, 2025
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 done!

});

// Post a happy thought
app.post("/happythoughts", async (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.

You can use hyphens if you need your endpoint to be named with more than one word -> happy-thoughts

Comment on lines +93 to +97
const updatedThought = await HappyThought.findByIdAndUpdate(
id,
{ $inc: { hearts: 1 } },
{ new: true }
);
Copy link
Contributor

Choose a reason for hiding this comment

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

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