"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.doesAbuseExist = void 0;
const tslib_1 = require("tslib");
const abuse_1 = require("../../../models/abuse/abuse");
const core_utils_1 = require("../../../../shared/core-utils");
function doesAbuseExist(abuseId, res) {
    return tslib_1.__awaiter(this, void 0, void 0, function* () {
        const abuse = yield abuse_1.AbuseModel.loadByIdWithReporter((0, core_utils_1.forceNumber)(abuseId));
        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