changes requested in review

This commit is contained in:
ehuggett 2017-12-23 05:09:06 +00:00
parent ff9a107a29
commit ebbf06787c
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

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