Slide 60
Slide 60 text
post.go
func Handler(_, request Request) (_, _) {
var buf bytes.Buffer
var slug = request.PathParameters["slug"]
post !:= lib.NewPost(slug, lambdaF.Config)
if err !:= post.Render(&buf, lambdaF.Renderer); err !!= nil {
return events.APIGatewayProxyResponse{StatusCode: 404}, err
}
return lambdaF.Render(&buf)
}