changes requested in review
This commit is contained in:
parent
ff9a107a29
commit
ebbf06787c
|
@ -14,7 +14,7 @@ module.exports = async (req, res) => {
|
||||||
const meta = await storage.metadata(id);
|
const meta = await storage.metadata(id);
|
||||||
res.set('WWW-Authenticate', `send-v1 ${meta.nonce}`);
|
res.set('WWW-Authenticate', `send-v1 ${meta.nonce}`);
|
||||||
res.send({
|
res.send({
|
||||||
password: meta.pwd
|
password: meta.pwd !== '0'
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
res.sendStatus(404);
|
res.sendStatus(404);
|
||||||
|
|
|
@ -29,8 +29,8 @@ module.exports = async function(req, res) {
|
||||||
const ttl = await storage.ttl(id);
|
const ttl = await storage.ttl(id);
|
||||||
res.send({
|
res.send({
|
||||||
metadata: meta.metadata,
|
metadata: meta.metadata,
|
||||||
dtotal: meta.dl,
|
dtotal: +meta.dl,
|
||||||
dlimit: meta.dlimit,
|
dlimit: +meta.dlimit,
|
||||||
size,
|
size,
|
||||||
ttl
|
ttl
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue