mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 22:50:53 +03:00
formatted
This commit is contained in:
@@ -35,7 +35,7 @@ app.get('/exists/:id', (req, res) => {
|
|||||||
let id = req.params.id;
|
let id = req.params.id;
|
||||||
storage.exists(id).then(doesExist => {
|
storage.exists(id).then(doesExist => {
|
||||||
res.sendStatus(doesExist ? 200 : 404);
|
res.sendStatus(doesExist ? 200 : 404);
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/download/:id', (req, res) => {
|
app.get('/download/:id', (req, res) => {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ const path = require('path');
|
|||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
|
|
||||||
|
|
||||||
let notLocalHost = conf.notLocalHost;
|
let notLocalHost = conf.notLocalHost;
|
||||||
|
|
||||||
const mozlog = require('./log.js');
|
const mozlog = require('./log.js');
|
||||||
@@ -19,7 +18,6 @@ const redis_client = redis.createClient({
|
|||||||
host: conf.redis_host
|
host: conf.redis_host
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
redis_client.on('error', err => {
|
redis_client.on('error', err => {
|
||||||
log.info('Redis: ', err);
|
log.info('Redis: ', err);
|
||||||
});
|
});
|
||||||
@@ -61,7 +59,7 @@ function filename(id) {
|
|||||||
function exists(id) {
|
function exists(id) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
redis_client.exists(id, (rediserr, reply) => {
|
redis_client.exists(id, (rediserr, reply) => {
|
||||||
resolve(reply === 1)
|
resolve(reply === 1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user