"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.doesVideoBlacklistExist = void 0;
const tslib_1 = require("tslib");
const video_blacklist_1 = require("../../../models/video/video-blacklist");
function doesVideoBlacklistExist(videoId, res) {
    return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
        const videoBlacklist = yield video_blacklist_1.VideoBlacklistModel.loadByVideoId(videoId);
        if (videoBlacklist === null) {
            res.fail({
                status: 404,
                message: 'Blacklisted video not found'
            });
            return false;
        }
        res.locals.videoBlacklist = videoBlacklist;
        return true;
    });
}
exports.doesVideoBlacklistExist = doesVideoBlacklistExist;
//# sourceMappingURL=video-blacklists.js.map