Skip to content

Commit 42815f2

Browse files
committed
then added
1 parent dc1d798 commit 42815f2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

web/backend/src/Server.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,15 @@ app.post('/api/add_role', (req, res) => {
232232
return;
233233
}
234234

235-
usersDB.put(sciper, role).catch((error) => {
235+
usersDB
236+
.put(sciper, role)
237+
.then(()=>res.status(200).send('Role added'))
238+
.catch((error) => {
236239
res.status(500).send('Failed to add role');
237240
console.log(error);
238241
});
239242

240-
res.status(200).send('Role added');
243+
241244
})
242245
.catch((error) => {
243246
res.status(500).send('Failed to check Sciper');

0 commit comments

Comments
 (0)