We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
next
1 parent 98a7e55 commit e1e5814Copy full SHA for e1e5814
src/index.ts
@@ -33,7 +33,7 @@ export const jwt = ({
33
responseHeaderName = 'X-Token',
34
getToken = getTokenFromHeader
35
}: JwtMwProps) => {
36
- return function (req: RequestWithUser, res: ServerResponse, next?: () => void) {
+ return function (req: RequestWithUser, res: ServerResponse, next: () => void) {
37
const token: string = getToken((req.headers[requestHeaderName] as string) ?? '')
38
39
try {
@@ -56,9 +56,9 @@ export const jwt = ({
56
algorithm
57
})
58
)
59
- next?.()
+ next()
60
} catch {
61
62
}
63
64
0 commit comments