This website works better with JavaScript.
Почетна
Преглед
Помоћ
Пријавите Се
kj
/
anamnesis-backend
Прати
1
Волим
0
Креирај огранак
0
Код
Дискусије
0
Захтеви за спајање
0
Издања
0
Вики
Activity
Преглед изворни кода
Returning IDs for category and shelf on addition of new record
master
kj1352
пре 4 година
родитељ
0ed1477ab7
комит
1eafa8af23
2 измењених фајлова
са
4 додато
и
2 уклоњено
Подељен поглед
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-1
src/user-profile/category-routes.ts
+2
-1
src/user-profile/shelf-routes.ts
+ 2
- 1
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;
+ 2
- 1
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);
}
Write
Preview
Loading…
Откажи
Сачувај