22 lines
453 B
JavaScript
22 lines
453 B
JavaScript
'use strict';
|
|
|
|
const util = require('util');
|
|
const config = require('config');
|
|
const fetch = require('node-fetch');
|
|
|
|
function reddit(post) {
|
|
return Promise.resolve({
|
|
album: null,
|
|
items: [{
|
|
id: post.host.id || post.id,
|
|
url: post.url,
|
|
title: post.title,
|
|
datetime: post.datetime,
|
|
type: 'image/jpeg',
|
|
original: post
|
|
}]
|
|
});
|
|
};
|
|
|
|
module.exports = reddit;
|