Files
Sukka d82847f541 style/chore(eslint): enforce new rules (#8040)
* style: prefer object shorthand syntax
* refactor: prefer Array#map over Array#forEach
* style: prefer arrow callback
* chore(eslint): update rules
* style: auto fix by eslint
2021-08-17 22:23:23 +08:00

16 lines
450 B
JavaScript

const utils = require('./utils');
module.exports = async (ctx) => {
const author = ctx.params.author;
const url = ctx.params.category ? `https://home.gamer.com.tw/creationCategory.php?owner=${author}&c=${ctx.params.category}` : `https://home.gamer.com.tw/creation.php?owner=${author}`;
const { title, items } = await utils.ProcessFeed(url, ctx);
ctx.state.data = {
title,
link: url,
item: items,
};
};