Цей веб-сайт працює краще з JavaScript.
Головна
Огляд
Довідка
Увійти
kj
/
anamnesis-backend
Слідкувати
1
В обрані
0
Форк
0
Код
Проблеми
0
Запити на злиття
0
Релізи
0
Вікі
Активність
Переглянути джерело
Returning IDs for category and shelf on addition of new record
master
kj1352
4 роки тому
джерело
0ed1477ab7
коміт
1eafa8af23
2 змінених файлів
з
4 додано
та
2 видалено
Розділений перегляд
Параметри порівняння
Показати статистику
Завантажити патч
Завантажити файл різниці
+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);
}
Писати
Попередній перегляд
Завантаження…
Відмінити
Зберегти