From 27d0935290b6785eccf2c5c073ab9866778bfe97 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Mon, 11 Mar 2024 08:33:11 -0600 Subject: [PATCH] lower limit on number of images --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index b671df2..a68f5a0 100644 --- a/server.js +++ b/server.js @@ -99,7 +99,7 @@ app.post('/image', uploadMulter.single('image'), async (req, res) => { return res.status(400).send(JSON.stringify({ success: false, message: 'Got bad status of ' + response.status + ' when checking limits with endorser server. Verify that the account exists and that the JWT works for that server.'})); } else { const body = await response.json(); - limitPerWeek = body.maxClaimsPerWeek + limitPerWeek = body.maxClaimsPerWeek / 4; // allowing fewer images than claims await new Promise((resolve, reject) => { db.run( @@ -276,7 +276,7 @@ app.delete('/image/:url', async (req, res) => { ); }); if (!thisUserImageFile) { - console.log('No image entry found for user', issuerDid, '& URL', url, 'so returning 404.'); + console.error('No image entry found for user', issuerDid, '& URL', url, 'so returning 404.'); return res.status(404).send(JSON.stringify({ success: false, message: 'No image entry found for user ' + issuerDid + ' & URL ' + url })); }