lower limit on number of images
This commit is contained in:
@@ -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.'}));
|
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 {
|
} else {
|
||||||
const body = await response.json();
|
const body = await response.json();
|
||||||
limitPerWeek = body.maxClaimsPerWeek
|
limitPerWeek = body.maxClaimsPerWeek / 4; // allowing fewer images than claims
|
||||||
|
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
db.run(
|
db.run(
|
||||||
@@ -276,7 +276,7 @@ app.delete('/image/:url', async (req, res) => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
if (!thisUserImageFile) {
|
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 }));
|
return res.status(404).send(JSON.stringify({ success: false, message: 'No image entry found for user ' + issuerDid + ' & URL ' + url }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user