使用 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 次删除
分列视图
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);
}
撰写
预览
正在加载...
取消
保存