Il sito funziona meglio con JavaScript.
Home
Esplora
Aiuto
Accedi
kj
/
anamnesis-backend
Segui
1
Vota
0
Forka
0
Codice
Problemi
0
Pull Requests
0
Rilasci
0
Wiki
Attività
Sfoglia il codice sorgente
Returning IDs for category and shelf on addition of new record
master
kj1352
4 anni fa
parent
0ed1477ab7
commit
1eafa8af23
2 ha cambiato i file
con
4 aggiunte
e
2 eliminazioni
Visualizzazione separata
Opzioni Diff
Mostra statistiche
Scarica il file Patch
Scarica il file 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
Vedi File
@@ -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
Vedi File
@@ -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);
}
Scrivi
Anteprima
Caricamento…
Annulla
Salva