Add "fetch" option to pledges list

Otherwise it doesn't actually fetch anything :/
This commit is contained in:
Hippo 2022-01-11 14:23:51 +05:30
parent bea9203b00
commit 577e10baaa

View file

@ -498,6 +498,7 @@ router.get('/pledges', async (req, res) => {
await Pledge await Pledge
.forge() .forge()
.orderBy('created_at', 'DESC') .orderBy('created_at', 'DESC')
.fetchAll()
).models ).models
if (DEBUG) console.log(`Listing ${recentPledges.length} pledges`) if (DEBUG) console.log(`Listing ${recentPledges.length} pledges`)