1
0
forked from mirror/misskey
This commit is contained in:
tamaina 2022-02-20 01:12:30 +09:00
parent fd8f8162e1
commit 0cab102f3a
2 changed files with 3 additions and 3 deletions

View File

@ -78,8 +78,8 @@ export default async (endpoint: string, user: User | null | undefined, token: Ac
}
// Cast non JSON input
if (ep.meta.requireFile) {
for (const k of Object.keys(ep.params)) {
if (ep.meta.requireFile && ep.params.properties) {
for (const k of Object.keys(ep.params.properties)) {
const param = ep.params.properties![k];
if (['boolean', 'number', 'integer'].includes(param.type ?? '') && typeof data[k] === 'string') {
try {

View File

@ -35,7 +35,7 @@ export const meta = {
},
} as const;
const paramDef = {
export const paramDef = {
type: 'object',
properties: {
folderId: { type: 'string', format: 'misskey:id', nullable: true, default: null },