diff --git a/public/main.css b/public/main.css index c04950a6..ef074d8a 100644 --- a/public/main.css +++ b/public/main.css @@ -1,8 +1,7 @@ /*** index.html ***/ html { background: url('resources/send_bg.svg'); - font-family: - -apple-system, + font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Helvetica, diff --git a/server/storage.js b/server/storage.js index 3fc1af84..93d1c46c 100644 --- a/server/storage.js +++ b/server/storage.js @@ -27,7 +27,6 @@ if (conf.s3_bucket) { length: awsLength, get: awsGet, set: awsSet, - aad: aad, setField: setField, delete: awsDelete, forceDelete: awsForceDelete, @@ -44,7 +43,6 @@ if (conf.s3_bucket) { length: localLength, get: localGet, set: localSet, - aad: aad, setField: setField, delete: localDelete, forceDelete: localForceDelete, @@ -66,11 +64,10 @@ function quit() { function metadata(id) { return new Promise((resolve, reject) => { redis_client.hgetall(id, (err, reply) => { - if (!err) { - resolve(reply); - } else { - reject(err); + if (err || !reply) { + return reject(err); } + resolve(reply); }); }); } @@ -78,11 +75,10 @@ function metadata(id) { function ttl(id) { return new Promise((resolve, reject) => { redis_client.ttl(id, (err, reply) => { - if (!err) { - resolve(reply * 1000); - } else { - reject(err); + if (err || !reply) { + return reject(err); } + resolve(reply * 1000); }); }); } @@ -114,18 +110,6 @@ function setField(id, key, value) { redis_client.hset(id, key, value); } -function aad(id) { - return new Promise((resolve, reject) => { - redis_client.hget(id, 'aad', (err, reply) => { - if (!err) { - resolve(reply); - } else { - reject(); - } - }); - }); -} - function localLength(id) { return new Promise((resolve, reject) => { try {