mirror of https://gitgud.io/fatchan/jschan.git
parent
f7d1ba9470
commit
eb8f87978e
4 changed files with 13 additions and 13 deletions
@ -1,8 +1,8 @@ |
|||||||
'use strict'; |
'use strict'; |
||||||
|
|
||||||
const { stat, remove, readdir } = require('fs-extra') |
const { stat, remove, readdir } = require('fs-extra') |
||||||
, uploadDirectory = require(__dirname+'/../files/uploadDirectory.js') |
, uploadDirectory = require(__dirname+'/../helpers/files/uploadDirectory.js') |
||||||
, msTime = require(__dirname+'/../mstime.js') |
, msTime = require(__dirname+'/../helpers/mstime.js') |
||||||
|
|
||||||
module.exports = async () => { |
module.exports = async () => { |
||||||
const files = await readdir(`${uploadDirectory}captcha/`); |
const files = await readdir(`${uploadDirectory}captcha/`); |
@ -1,8 +1,8 @@ |
|||||||
'use strict'; |
'use strict'; |
||||||
|
|
||||||
const Files = require(__dirname+'/../../db/files.js') |
const Files = require(__dirname+'/../db/files.js') |
||||||
, { remove } = require('fs-extra') |
, { remove } = require('fs-extra') |
||||||
, uploadDirectory = require(__dirname+'/uploadDirectory.js'); |
, uploadDirectory = require(__dirname+'/../helpers/files/uploadDirectory.js'); |
||||||
|
|
||||||
module.exports = async() => { |
module.exports = async() => { |
||||||
//todo: make this not a race condition, but it only happens daily so ¯\_(ツ)_/¯
|
//todo: make this not a race condition, but it only happens daily so ¯\_(ツ)_/¯
|
@ -1,18 +1,18 @@ |
|||||||
'use strict'; |
'use strict'; |
||||||
|
|
||||||
const fetch = require('node-fetch') |
const fetch = require('node-fetch') |
||||||
, { meta } = require(__dirname+'/configs/main.json') |
, { meta } = require(__dirname+'/../configs/main.json') |
||||||
, { following, blacklist } = require(__dirname+'/configs/webring.json') |
, { following, blacklist } = require(__dirname+'/../configs/webring.json') |
||||||
, { Boards } = require(__dirname+'/db/') |
, { Boards } = require(__dirname+'/../db/') |
||||||
, { outputFile } = require('fs-extra') |
, { outputFile } = require('fs-extra') |
||||||
, cache = require(__dirname+'/redis.js') |
, cache = require(__dirname+'/../redis.js') |
||||||
, uploadDirectory = require(__dirname+'/helpers/files/uploadDirectory.js'); |
, uploadDirectory = require(__dirname+'/../helpers/files/uploadDirectory.js'); |
||||||
|
|
||||||
module.exports = async () => { |
module.exports = async () => { |
||||||
//fetch stuff from others
|
//fetch stuff from others
|
||||||
const fetchWebring = [...new Set((await cache.get('webring:sites') || []).concat(following))] |
const fetchWebring = [...new Set((await cache.get('webring:sites') || []).concat(following))] |
||||||
let rings = await Promise.all(fetchWebring.map(url => { |
let rings = await Promise.all(fetchWebring.map(url => { |
||||||
return fetch(url).then(res => res.json()); |
return fetch(url).then(res => res.json()).catch(e => console.error); |
||||||
})); |
})); |
||||||
let found = []; |
let found = []; |
||||||
let webringBoards = []; |
let webringBoards = []; |
Loading…
Reference in new issue