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'; |
||||
|
||||
const { stat, remove, readdir } = require('fs-extra') |
||||
, uploadDirectory = require(__dirname+'/../files/uploadDirectory.js') |
||||
, msTime = require(__dirname+'/../mstime.js') |
||||
, uploadDirectory = require(__dirname+'/../helpers/files/uploadDirectory.js') |
||||
, msTime = require(__dirname+'/../helpers/mstime.js') |
||||
|
||||
module.exports = async () => { |
||||
const files = await readdir(`${uploadDirectory}captcha/`); |
@ -1,8 +1,8 @@ |
||||
'use strict'; |
||||
|
||||
const Files = require(__dirname+'/../../db/files.js') |
||||
const Files = require(__dirname+'/../db/files.js') |
||||
, { remove } = require('fs-extra') |
||||
, uploadDirectory = require(__dirname+'/uploadDirectory.js'); |
||||
, uploadDirectory = require(__dirname+'/../helpers/files/uploadDirectory.js'); |
||||
|
||||
module.exports = async() => { |
||||
//todo: make this not a race condition, but it only happens daily so ¯\_(ツ)_/¯
|
@ -1,18 +1,18 @@ |
||||
'use strict'; |
||||
|
||||
const fetch = require('node-fetch') |
||||
, { meta } = require(__dirname+'/configs/main.json') |
||||
, { following, blacklist } = require(__dirname+'/configs/webring.json') |
||||
, { Boards } = require(__dirname+'/db/') |
||||
, { meta } = require(__dirname+'/../configs/main.json') |
||||
, { following, blacklist } = require(__dirname+'/../configs/webring.json') |
||||
, { Boards } = require(__dirname+'/../db/') |
||||
, { outputFile } = require('fs-extra') |
||||
, cache = require(__dirname+'/redis.js') |
||||
, uploadDirectory = require(__dirname+'/helpers/files/uploadDirectory.js'); |
||||
, cache = require(__dirname+'/../redis.js') |
||||
, uploadDirectory = require(__dirname+'/../helpers/files/uploadDirectory.js'); |
||||
|
||||
module.exports = async () => { |
||||
//fetch stuff from others
|
||||
const fetchWebring = [...new Set((await cache.get('webring:sites') || []).concat(following))] |
||||
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 webringBoards = []; |
Loading…
Reference in new issue