server: return report id when reporting
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline failed
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/lint-backend Pipeline failed
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline failed
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/lint-backend Pipeline failed
This can be useful when adding a feature for admins and moderators where they will be able to immediately deal with their own report, i.e. forwarding it to the other instance. Changelog: Added
This commit is contained in:
parent
fba8536743
commit
d4a5ed29db
1 changed files with 16 additions and 0 deletions
|
@ -16,6 +16,20 @@ export const meta = {
|
||||||
|
|
||||||
description: 'File a report.',
|
description: 'File a report.',
|
||||||
|
|
||||||
|
res: {
|
||||||
|
type: 'object',
|
||||||
|
optional: false,
|
||||||
|
required: true,
|
||||||
|
properties: {
|
||||||
|
id: {
|
||||||
|
type: 'string',
|
||||||
|
format: 'misskey:id',
|
||||||
|
optional: false,
|
||||||
|
nullable: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
errors: ['NO_SUCH_USER', 'CANNOT_REPORT_ADMIN', 'CANNOT_REPORT_YOURSELF'],
|
errors: ['NO_SUCH_USER', 'CANNOT_REPORT_ADMIN', 'CANNOT_REPORT_YOURSELF'],
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
@ -81,4 +95,6 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
sanitizeHtml(ps.comment));
|
sanitizeHtml(ps.comment));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return { id: report.id };
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue