"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const typeorm_1 = require("typeorm");
const entities_1 = require("../../../entities");
exports.updateSetting = {
    async updateSetting(_, { name, patch }) {
        const repository = typeorm_1.getRepository(entities_1.Setting);
        const setting = await repository.findOne({ name });
        return await repository.save(Object.assign({}, setting, patch));
    }
};
//# sourceMappingURL=update-setting.js.map