Adding a "in" keyword in JWT's post route example. (#1065)

<!-- 🚀 Thank you for contributing! -->
There was a "in" keyword missing in the post route example for signing
JWTs. The keyword was simply added to the code snippet.
<!-- Describe your changes clearly and use examples if possible. -->

<!-- When this PR is merged, the title and body will be -->
<!-- used to generate a release automatically. -->

---------

Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
This commit is contained in:
Pedro Peçanha 2025-03-06 12:33:35 -03:00 committed by GitHub
parent 0d9e04bb54
commit 47ee8bf16c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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: 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 ```swift
app.post("login") { req async throws -> [String: String] app.post("login") { req async throws -> [String: String] in
let payload = TestPayload( let payload = TestPayload(
subject: "vapor", subject: "vapor",
expiration: .init(value: .distantFuture), expiration: .init(value: .distantFuture),

View File

@ -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: Signing the payload is done by calling the `sign` method on the `JWT` module, for example inside of a route handler:
```swift ```swift
app.post("login") { req async throws -> [String: String] app.post("login") { req async throws -> [String: String] in
let payload = TestPayload( let payload = TestPayload(
subject: "vapor", subject: "vapor",
expiration: .init(value: .distantFuture), expiration: .init(value: .distantFuture),