mirror of
https://github.com/myfatemi04/wheelshare-old-backend.git
synced 2025-04-21 20:19:49 -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.delete('/user', (req, res) => {});
|
||||||
|
|
||||||
router.get('/pool', (req, res) => {
|
router.get('/pool', async (req, res) => {
|
||||||
if (typeof req.query.poolID != 'string') {
|
if (typeof req.query.poolID != 'string') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let poolID = req.query.poolID;
|
let poolID = req.query.poolID;
|
||||||
let pool = getPoolByID(poolID);
|
let pool = await getPoolByID(poolID);
|
||||||
|
|
||||||
if (pool) {
|
if (pool) {
|
||||||
res.json({ status: 'success', data: pool });
|
res.json({ status: 'success', data: pool });
|
||||||
|
|
Loading…
Reference in New Issue
Block a user