fix(route): bilibli/user/collection disableEmbed (#14929)
This commit is contained in:
parent
76bc7216ed
commit
e7fb557a36
|
|
@ -3,6 +3,7 @@ import got from '@/utils/got';
|
|||
import cache from './cache';
|
||||
import utils from './utils';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { queryToBoolean } from '@/utils/readable-social';
|
||||
|
||||
const notFoundData = {
|
||||
title: '此 bilibili 频道不存在',
|
||||
|
|
@ -15,7 +16,7 @@ export const route: Route = {
|
|||
parameters: {
|
||||
uid: '用户 id, 可在 UP 主主页中找到',
|
||||
sid: '合集 id, 可在合集页面的 URL 中找到',
|
||||
disableEmbed: '默认为开启内嵌视频, 任意值为关闭',
|
||||
disableEmbed: '空,0与false为开启内嵌视频, 其他任意值为关闭',
|
||||
sortReverse: '默认:默认排序 1:升序排序',
|
||||
page: '页码, 默认1',
|
||||
},
|
||||
|
|
@ -35,7 +36,7 @@ export const route: Route = {
|
|||
async function handler(ctx) {
|
||||
const uid = Number.parseInt(ctx.req.param('uid'));
|
||||
const sid = Number.parseInt(ctx.req.param('sid'));
|
||||
const disableEmbed = ctx.req.param('disableEmbed');
|
||||
const disableEmbed = queryToBoolean(ctx.req.param('disableEmbed'));
|
||||
const sortReverse = Number.parseInt(ctx.req.param('sortReverse')) === 1;
|
||||
const page = ctx.req.param('page') ? Number.parseInt(ctx.req.param('page')) : 1;
|
||||
const limit = ctx.req.query('limit') ?? 25;
|
||||
|
|
|
|||
Loading…
Reference in New Issue