generated from lucien/api-template
add: improved frontend and added descriptions to users
This commit is contained in:
parent
6342377aa0
commit
eca9efc170
14 changed files with 266 additions and 29 deletions
|
@ -37,7 +37,7 @@ router.get('/:username', async (req, res) => {
|
|||
const user = await getUserByUsername(connection, username);
|
||||
connection.end();
|
||||
if (user[0]) {
|
||||
res.send({id: user[0].id, username: user[0].username, admin: user[0].admin});
|
||||
res.send({id: user[0].id, username: user[0].username, admin: user[0].admin, description: user[0].description});
|
||||
} else {
|
||||
return res.status(400).send({ error: 'No user found' });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue