mirror of
https://github.com/myfatemi04/wheelshare-old-backend.git
synced 2025-04-18 10:50:18 -04:00
add 'await' to getPool
This commit is contained in:
parent
85d54333be
commit
603b7532e4
|
@ -43,13 +43,13 @@ router.patch('/user', (req, res) => {
|
|||
|
||||
router.delete('/user', (req, res) => {});
|
||||
|
||||
router.get('/pool', (req, res) => {
|
||||
router.get('/pool', async (req, res) => {
|
||||
if (typeof req.query.poolID != 'string') {
|
||||
return;
|
||||
}
|
||||
|
||||
let poolID = req.query.poolID;
|
||||
let pool = getPoolByID(poolID);
|
||||
let pool = await getPoolByID(poolID);
|
||||
|
||||
if (pool) {
|
||||
res.json({ status: 'success', data: pool });
|
||||
|
|
Loading…
Reference in New Issue
Block a user