Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Andres Virviescas Santana committed Sep 26, 2018
1 parent 6f7994a commit 1bf912f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/jwt_auth_middleware_sever/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ func main() {
server.UseMiddleware(checkTokenMiddleware)

server.Path("GET", "/", func(ctx *atreugo.RequestCtx) error {
return ctx.HTTPResponse([]byte(fmt.Sprintf(`<h1>You are login with JWT</h1>
JWT cookie value: %s`, ctx.Request.Header.Cookie("atreugo_jwt"))))
return ctx.HTTPResponse(fmt.Sprintf(`<h1>You are login with JWT</h1>
JWT cookie value: %s`, ctx.Request.Header.Cookie("atreugo_jwt")))
})

server.Path("GET", "/login", func(ctx *atreugo.RequestCtx) error {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func main() {
server.UseMiddleware(fnMiddlewareOne, fnMiddlewareTwo)

server.Path("GET", "/", func(ctx *atreugo.RequestCtx) error {
return ctx.HTTPResponse([]byte("<h1>Atreugo Micro-Framework</h1>"))
return ctx.HTTPResponse("<h1>Atreugo Micro-Framework</h1>")
})

server.Path("GET", "/jsonPage", func(ctx *atreugo.RequestCtx) error {
Expand Down

0 comments on commit 1bf912f

Please sign in to comment.