Ejemplo n.º 1
0
        private async Task saveWorkerGoalCount(HttpContext context)
        {
            var parsed = await parseRequestBody(context.Request);

            _configurationApi.WriteGoalWorkerCount(new WriteGoalWorkerCount
            {
                ConfigurationId = tryParseNullable(parsed.SelectToken("configurationId")?.Value <string>()),
                Workers         = tryParseNullable(parsed.SelectToken("workers").Value <string>())
            });
            context.Response.WriteAsync("Worker goal count was saved successfully!").Wait();
        }