public ActionResult <string> GetConfig([FromServices] ITenantConfigService tenantConfigSvc, string tenantId) { try { string result = tenantConfigSvc.ReadConfig(tenantId); return(Ok(result)); } catch (Exception exc) { return(BadRequest(exc.Message)); } }
public ActionResult <string> PostConfig([FromServices] ITenantConfigService tenantConfigSvc, string tenantId, [FromBody] JObject body) { try { string result = tenantConfigSvc.CreateConfig(body.ToString()); return(Ok(result)); } catch (Exception exc) { return(Ok(exc.Message)); } }