Denna sida fungerar bättre med Javascript igång.
Startsida
Utforska
Hjälp
Logga in
kj
/
anamnesis-backend
Bevaka
1
Stjärnmärk
0
Förgrening
0
Kod
Ärenden
0
Pull-förfrågningar
0
Släpp
0
Wiki
Aktiviteter
Bläddra i källkod
Returning IDs for category and shelf on addition of new record
master
kj1352
4 år sedan
förälder
0ed1477ab7
incheckning
1eafa8af23
2 ändrade filer
med
4 tillägg
och
2 borttagningar
Delad Vy
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
Visa fil
@@ -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
Visa fil
@@ -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);
}
Skriv
Förhandsgranska
Laddar…
Avbryt
Spara