コード例 #1
0
        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());
        }
コード例 #2
0
 public async Task <IActionResult> GetFeatureFlagStatusAsync([FromServices] IFlagAppService flagAppService,
                                                             string projectId, string environmentId, string flagId)
 {
     return(Ok(await flagAppService.GetStatusAsync(projectId, environmentId, flagId)));
 }
コード例 #3
0
 public async Task <IActionResult> GetByEnviromentAsync([FromServices] IFlagAppService flagAppService,
                                                        string projectId, string environmentId)
 {
     return(Ok(await flagAppService.GetAsync(projectId, environmentId)));
 }
コード例 #4
0
        public async Task <IActionResult> CreateAsync([FromServices] IFlagAppService flagAppService, [FromBody] Flag flag)
        {
            await flagAppService.CreateAsync(flag);

            return(Created($"{Request.Path}", flag));
        }
コード例 #5
0
        public async Task <IActionResult> PutAsync([FromServices] IFlagAppService flagAppService, [FromBody] Flag flag)
        {
            await flagAppService.UpdateAsync(flag);

            return(Ok(flag));
        }