public async Task <IActionResult> CreateAsync([FromServices] IFlagAppService flagAppService, [FromServices] IEnvironmentAppService environmentAppService, string projectId, string environmentId, [FromBody] Flag flag) { flag.Environment = await environmentAppService.GetAsync(projectId, environmentId); await flagAppService.CreateAsync(flag); return(Ok()); }
public async Task <IActionResult> GetFeatureFlagStatusAsync([FromServices] IFlagAppService flagAppService, string projectId, string environmentId, string flagId) { return(Ok(await flagAppService.GetStatusAsync(projectId, environmentId, flagId))); }
public async Task <IActionResult> GetByEnviromentAsync([FromServices] IFlagAppService flagAppService, string projectId, string environmentId) { return(Ok(await flagAppService.GetAsync(projectId, environmentId))); }
public async Task <IActionResult> CreateAsync([FromServices] IFlagAppService flagAppService, [FromBody] Flag flag) { await flagAppService.CreateAsync(flag); return(Created($"{Request.Path}", flag)); }
public async Task <IActionResult> PutAsync([FromServices] IFlagAppService flagAppService, [FromBody] Flag flag) { await flagAppService.UpdateAsync(flag); return(Ok(flag)); }