public async Task <APIGatewayProxyResponse> GetPostById(APIGatewayProxyRequest request) { var blogId = request.GetPathParameter("id"); Log.Debug("GetById {@BlogId} called", blogId); var blogPost = await blogService.GetById(blogId); return(blogPost.Ok()); }
public void GetPathParameter_WrongKey() { var pathParameters = new Dictionary <string, string> { { "key", "value" } }; var request = new APIGatewayProxyRequest { PathParameters = pathParameters }; request.GetPathParameter("kaka").Should().BeNull(); }