mirror of
https://github.com/myfatemi04/wheelshare-old-backend.git
synced 2025-04-21 12:10:17 -04:00
add 'await'
This commit is contained in:
parent
31900a4649
commit
446ecf5c78
|
@ -4,6 +4,6 @@ import { GroupModel } from '../models';
|
|||
export const router = Router();
|
||||
|
||||
router.get('/groups', async (req, res) => {
|
||||
let groups = GroupModel.find().exec();
|
||||
let groups = await GroupModel.find().exec();
|
||||
res.json({ status: 'success', data: groups });
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user