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