mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-17 05:11:57 +08:00
ef497881a7
* fix(route): allow Mastodon without extra config * Maintain zh/en doc consistency and enhance the desc of reqs * Add description about Mastodon out of the box * refactor: migrate to v2 ---------
19 lines
587 B
JavaScript
19 lines
587 B
JavaScript
const utils = require('./utils');
|
|
|
|
module.exports = async (ctx) => {
|
|
const acct = ctx.params.acct;
|
|
const only_media = ctx.params.only_media ? 'true' : 'false';
|
|
|
|
const { site, account_id } = await utils.getAccountIdByAcct(acct, ctx);
|
|
|
|
const { account_data, data } = await utils.getAccountStatuses(site, account_id, only_media);
|
|
|
|
ctx.state.data = {
|
|
title: `${account_data.display_name} (@${account_data.acct})`,
|
|
link: account_data.url,
|
|
description: account_data.note,
|
|
item: utils.parseStatuses(data),
|
|
allowEmpty: true,
|
|
};
|
|
};
|