diff --git a/src/user-profile/category-routes.ts b/src/user-profile/category-routes.ts index f74c7b7..92c9436 100644 --- a/src/user-profile/category-routes.ts +++ b/src/user-profile/category-routes.ts @@ -71,7 +71,8 @@ categoryRoutes.post('/add/', jwtAuthentication, async (request, response) => { } }); - response.sendStatus(200); + response.send(200); + response.send(newCategory.insertedId.toHexString()); } catch(e) { response.sendStatus(500); return; diff --git a/src/user-profile/shelf-routes.ts b/src/user-profile/shelf-routes.ts index d6d29d6..98d1813 100644 --- a/src/user-profile/shelf-routes.ts +++ b/src/user-profile/shelf-routes.ts @@ -87,7 +87,8 @@ shelfRoutes.post('/add/', jwtAuthentication, async (request, response) => { }); if (updatedCategory) { - response.sendStatus(200); + response.status(200); + response.send(newShelf.insertedId); } else { response.sendStatus(500); }