本網站在啟用 JavaScript 的情況下可以運作的更好。
首頁
探索
說明
登入
kj
/
anamnesis-backend
關注
1
收藏
0
複製
0
程式碼
問題
0
合併請求
0
版本發佈
0
Wiki
活動
瀏覽代碼
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…
取消
儲存