Files
RSSHub/lib/v2/javlibrary/user.js
T
2024-02-28 16:51:42 +08:00

12 lines
439 B
JavaScript

import cache from '@/utils/cache';
const { defaultLanguage, rootUrl, ProcessItems } = require('./utils');
module.exports = async (ctx) => {
const id = ctx.req.param('id');
const type = ctx.req.param('type');
const language = ctx.req.param('language') ?? defaultLanguage;
const currentUrl = `${rootUrl}/${language}/${type}.php?list&u=${id}`;
ctx.set('data', await ProcessItems(language, currentUrl, cache.tryGet));
};