"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.doesAbuseExist = void 0;
const tslib_1 = require("tslib");
const abuse_1 = require("../../../models/abuse/abuse");
function doesAbuseExist(abuseId, res) {
    return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
        const abuse = yield abuse_1.AbuseModel.loadByIdWithReporter(parseInt(abuseId + '', 10));
        if (!abuse) {
            res.fail({
                status: 404,
                message: 'Abuse not found'
            });
            return false;
        }
        res.locals.abuse = abuse;
        return true;
    });
}
exports.doesAbuseExist = doesAbuseExist;
//# sourceMappingURL=abuses.js.map