Browse Source

lower limit on number of images

pull/1/head
Trent Larson 9 months ago
parent
commit
27d0935290
  1. 4
      server.js

4
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 }));
}

Loading…
Cancel
Save