Fixed RedGIFs module content type.
This commit is contained in:
parent
7eaaadaa2a
commit
529f84d9c2
|
@ -4,5 +4,6 @@ config/*.js
|
||||||
output/
|
output/
|
||||||
dist/
|
dist/
|
||||||
users
|
users
|
||||||
|
users_invalid
|
||||||
posts
|
posts
|
||||||
ignore
|
ignore
|
||||||
|
|
|
@ -59,7 +59,7 @@ async function redgifs(host) {
|
||||||
id: data.gif.id,
|
id: data.gif.id,
|
||||||
url: data.gif.urls.hd,
|
url: data.gif.urls.hd,
|
||||||
description: data.gif.tags.join(', '),
|
description: data.gif.tags.join(', '),
|
||||||
type: mime.getType(data.gif.urls.hd),
|
type: mime.getType(new URL(data.gif.urls.hd).pathname),
|
||||||
datetime: new Date(data.gif.createDate * 1000),
|
datetime: new Date(data.gif.createDate * 1000),
|
||||||
original: data.gif,
|
original: data.gif,
|
||||||
}],
|
}],
|
||||||
|
|
|
@ -49,8 +49,6 @@ async function writeToIndex(posts, profilePaths, user, args) {
|
||||||
const yamlIndex = yaml.safeDump(data);
|
const yamlIndex = yaml.safeDump(data);
|
||||||
const saved = await save(filepath, Buffer.from(yamlIndex, 'utf8'));
|
const saved = await save(filepath, Buffer.from(yamlIndex, 'utf8'));
|
||||||
|
|
||||||
console.log(user);
|
|
||||||
|
|
||||||
logger.info(`Saved index with ${posts.length} new posts for ${user.name}`);
|
logger.info(`Saved index with ${posts.length} new posts for ${user.name}`);
|
||||||
|
|
||||||
return saved;
|
return saved;
|
||||||
|
|
Loading…
Reference in New Issue