public ConfigResponse Post(ConfigCommitRequest request) { logger.Debug("id's {0} {1}", request.MainPart, request.ModulesPart); string errors = ""; bool resp = false; resp = QueueService.ModProducer.broker.ValidateAndCommitConfigurations(request.MainPart, request.ModulesPart, request.AssemblysPart, out errors, request.Reset, request.Restart); if (resp) { errors = "OK"; } else { return(new ConfigResponse() { Result = errors, ConfigCommitID = null }); } return(new ConfigResponse() { Result = errors, // OR SOME ERROR DESCRIPTION ConfigCommitID = null }); }
public void Options(ConfigCommitRequest request) { var resp = this.Response; resp.StatusCode = 200; resp.AddHeader("Access-Control-Allow-Origin", "*"); resp.AddHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS"); resp.AddHeader("Access-Control-Allow-Headers", "X-PINGOTHER, Content-Type"); resp.AddHeader("Access-Control-Max-Age", "1728000"); resp.End(); }
public ConfigResponse Post(ConfigCommitRequest request) { logger.Debug("id's {0} {1}", request.MainPart, request.ModulesPart); string errors = ""; bool resp = false; resp = QueueService.ModProducer.broker.ValidateAndCommitConfigurations(request.MainPart, request.ModulesPart, request.AssemblysPart, out errors, request.Reset, request.Restart); if (resp) { errors = "OK"; } else { return new ConfigResponse() { Result = errors, ConfigCommitID = null }; } return new ConfigResponse() { Result = errors, // OR SOME ERROR DESCRIPTION ConfigCommitID = null }; }