get all accessible recipes

This commit is contained in:
Mikayla Dobson
2022-12-17 14:22:24 -06:00
parent 9a43f58ee3
commit 6c3f835b25
10 changed files with 54 additions and 18 deletions

View File

@@ -51,7 +51,16 @@ export const friendRouter = (app: Express) => {
}
})
// update a friendship by its id
/**
* Update friendship by friendship ID
* allows user who received a friend request to confirm it
* expects body schema of:
* active: boolean
* pending: boolean
* dateterminated: string | null
* receives friendship ID from req.params and checks
* against current user ID from session
*/
router.put('/:id', async (req, res, next) => {
const data = req.body;
const { id } = req.params;