mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 00:52:01 +01:00
show admin users first
This commit is contained in:
parent
73603e16dc
commit
1afc30fb48
1 changed files with 2 additions and 2 deletions
|
@ -209,8 +209,8 @@ const userController = {
|
|||
},
|
||||
|
||||
async getAll (req, res) {
|
||||
const users = await User.findAll({
|
||||
order: [['createdAt', 'DESC']]
|
||||
const users = await User.scope('withoutPassword').findAll({
|
||||
order: [['is_admin', 'DESC'], ['createdAt', 'DESC']]
|
||||
})
|
||||
res.json(users)
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue