"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UpdateProjectConfig = void 0;
class UpdateProjectConfig {
    projectRepository;
    constructor(projectRepository) {
        this.projectRepository = projectRepository;
    }
    async execute(projectId, config) {
        const project = await this.projectRepository.getProjectById(projectId);
        if (!project) {
            throw new Error(`Project with id ${projectId} not found`);
        }
        await this.projectRepository.updateProject(projectId, { config });
    }
}
exports.UpdateProjectConfig = UpdateProjectConfig;
//# sourceMappingURL=updateProjectConfig.js.map