mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 07:16:17 +00:00
14 lines
420 B
JavaScript
14 lines
420 B
JavaScript
|
|
const fs = require('fs-extra');
|
|
const actions = require('./actions');
|
|
const { uniqBy } = require('lodash');
|
|
const { resolve } = require('./resolve');
|
|
|
|
module.exports = exports = async function twitter () {
|
|
const media = await fs.readJson(resolve('twitter-media.json')).catch(() => ([]));
|
|
const tasks = uniqBy(media, 'input')
|
|
.map((m) => ({ ...m, action: actions.fetch, output: m.output }));
|
|
|
|
return tasks;
|
|
};
|