mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-04 07:26:29 +09:00
refactor
This commit is contained in:
@ -44,13 +44,8 @@ export const paramDef = {
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default define(meta, paramDef, async (ps, user) => {
|
||||
const note = await getNote(ps.noteId).catch(e => {
|
||||
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
||||
throw e;
|
||||
});
|
||||
|
||||
const query = {
|
||||
noteId: note.id,
|
||||
noteId: ps.noteId,
|
||||
} as DeepPartial<NoteReaction>;
|
||||
|
||||
if (ps.type) {
|
||||
|
@ -70,7 +70,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||
}).then(x => AbuseUserReports.findOneOrFail(x.identifiers[0]));
|
||||
|
||||
// Publish event to moderators
|
||||
setTimeout(async () => {
|
||||
setImmediate(async () => {
|
||||
const moderators = await Users.find({
|
||||
where: [{
|
||||
isAdmin: true,
|
||||
@ -94,5 +94,5 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||
sanitizeHtml(ps.comment),
|
||||
sanitizeHtml(ps.comment));
|
||||
}
|
||||
}, 1);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user