Tämä sivusto toimii paremmin JavaScriptillä.
Etusivu
Tutki
Apua
Kirjaudu sisään
kj
/
anamnesis-backend
Tarkkaile
1
Äänestä
0
Fork
0
Koodi
Ongelmat
0
Pull-pyynnöt
0
Julkaisut
0
Wiki
Toiminta
Selaa lähdekoodia
Returning IDs for category and shelf on addition of new record
master
kj1352
4 vuotta sitten
vanhempi
0ed1477ab7
commit
1eafa8af23
2 muutettua tiedostoa
jossa
4 lisäystä
ja
2 poistoa
Jaettu näkymä
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
Näytä tiedosto
@@ -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
Näytä tiedosto
@@ -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);
}
Kirjoita
Esikatselu
Ladataan…
Peruuta
Tallenna