diff --git a/src/api.ts b/src/api.ts index bd1fba7..d36dc1f 100644 --- a/src/api.ts +++ b/src/api.ts @@ -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 });