mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 14:10:53 +03:00
formatted
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user