public async Task <IActionResult> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] GetUserQuery getUserQuery, ILogger log) { return(await _httpFunctionExecutor.ExecuteAsync(async() => { var users = await _mediator.Send(getUserQuery); return new OkObjectResult(users); })); }
public async Task <IActionResult> Run( [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] Create.Command command, ILogger log) { log.LogInformation("AddPackage function processed a request."); return(await _httpFunctionExecutor.ExecuteAsync(async() => { var users = await _mediator.Send(command); return new OkObjectResult(users); })); }