"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const typeorm_1 = require("typeorm");
const entities_1 = require("../../../entities");
exports.publishBoard = {
    async publishBoard(_, { id, published }) {
        const repository = typeorm_1.getRepository(entities_1.Board);
        const board = await repository.findOne({ id }, {
            relations: ['group']
        });
        board.published = !!published;
        return await repository.save(board);
    }
};
//# sourceMappingURL=publish-board.js.map