"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.doesVideoChannelSyncIdExist = void 0;
const tslib_1 = require("tslib");
const video_channel_sync_1 = require("../../../models/video/video-channel-sync");
function doesVideoChannelSyncIdExist(id, res) {
    return tslib_1.__awaiter(this, void 0, void 0, function* () {
        const sync = yield video_channel_sync_1.VideoChannelSyncModel.loadWithChannel(+id);
        if (!sync) {
            res.fail({
                status: 404,
                message: 'Video channel sync not found'
            });
            return false;
        }
        res.locals.videoChannelSync = sync;
        return true;
    });
}
exports.doesVideoChannelSyncIdExist = doesVideoChannelSyncIdExist;
//# sourceMappingURL=video-channel-syncs.js.map