From 47ee8bf16cb2277c93e8c81f3f99b81400f9e6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Pe=C3=A7anha?= <60028123+pedrompecanha@users.noreply.github.com> Date: Thu, 6 Mar 2025 12:33:35 -0300 Subject: [PATCH] Adding a "in" keyword in JWT's post route example. (#1065) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was a "in" keyword missing in the post route example for signing JWTs. The keyword was simply added to the code snippet. --------- Co-authored-by: Tim Condon <0xTim@users.noreply.github.com> --- docs/security/jwt.es.md | 2 +- docs/security/jwt.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/security/jwt.es.md b/docs/security/jwt.es.md index 091f2040..30a934d2 100644 --- a/docs/security/jwt.es.md +++ b/docs/security/jwt.es.md @@ -94,7 +94,7 @@ struct TestPayload: JWTPayload { La firma de la carga útil se realiza llamando al método `sign` en el módulo `JWT`, por ejemplo dentro de un manejador de ruta: ```swift -app.post("login") { req async throws -> [String: String] +app.post("login") { req async throws -> [String: String] in let payload = TestPayload( subject: "vapor", expiration: .init(value: .distantFuture), diff --git a/docs/security/jwt.md b/docs/security/jwt.md index 8ea9b226..31aa074f 100644 --- a/docs/security/jwt.md +++ b/docs/security/jwt.md @@ -93,7 +93,7 @@ struct TestPayload: JWTPayload { Signing the payload is done by calling the `sign` method on the `JWT` module, for example inside of a route handler: ```swift -app.post("login") { req async throws -> [String: String] +app.post("login") { req async throws -> [String: String] in let payload = TestPayload( subject: "vapor", expiration: .init(value: .distantFuture),