formatted
This commit is contained in:
parent
6cb1fc433e
commit
5fe901e31d
|
@ -35,7 +35,7 @@ app.get('/exists/:id', (req, res) => {
|
|||
let id = req.params.id;
|
||||
storage.exists(id).then(doesExist => {
|
||||
res.sendStatus(doesExist ? 200 : 404);
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/download/:id', (req, res) => {
|
||||
|
|
|
@ -7,7 +7,6 @@ const path = require('path');
|
|||
const fetch = require('node-fetch');
|
||||
const crypto = require('crypto');
|
||||
|
||||
|
||||
let notLocalHost = conf.notLocalHost;
|
||||
|
||||
const mozlog = require('./log.js');
|
||||
|
@ -19,7 +18,6 @@ const redis_client = redis.createClient({
|
|||
host: conf.redis_host
|
||||
});
|
||||
|
||||
|
||||
redis_client.on('error', err => {
|
||||
log.info('Redis: ', err);
|
||||
});
|
||||
|
@ -61,7 +59,7 @@ function filename(id) {
|
|||
function exists(id) {
|
||||
return new Promise((resolve, reject) => {
|
||||
redis_client.exists(id, (rediserr, reply) => {
|
||||
resolve(reply === 1)
|
||||
resolve(reply === 1);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue