deleteAbuseMessageValidator,
ensureUserHasRight,
getAbuseValidator,
+ openapiOperationDoc,
paginationValidator,
setDefaultPagination,
setDefaultSort
const abuseRouter = express.Router()
abuseRouter.get('/',
+ openapiOperationDoc({ operationId: 'getAbuses' }),
authenticate,
ensureUserHasRight(UserRight.MANAGE_ABUSES),
paginationValidator,
// Do not send the delete to other instances, we updated OUR copy of this abuse
- return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
+ return res.status(HttpStatusCode.NO_CONTENT_204).end()
}
async function deleteAbuse (req: express.Request, res: express.Response) {
// Do not send the delete to other instances, we delete OUR copy of this abuse
- return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
+ return res.status(HttpStatusCode.NO_CONTENT_204).end()
}
async function reportAbuse (req: express.Request, res: express.Response) {
return abuseMessage.destroy({ transaction: t })
})
- return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
+ return res.status(HttpStatusCode.NO_CONTENT_204).end()
}