Prechádzať zdrojové kódy

+jwtGQLRole for anon, query recursive walker for object id and regexp

Ivan Asmer 5 rokov pred
rodič
commit
2fdd69b627
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      jwt.js

+ 1 - 1
jwt.js

@@ -33,7 +33,7 @@ module.exports = {
 
     jwtGQLRole: ({schema, rootValue={},secret, createContext, graphiql=true, anonJwtSub={id: "anon"}}) => 
         async (req, res, gql) => { 
-            let decoded = jwtCheck(req, secret)) || {sub: anonJwtSub}
+            let decoded = jwtCheck(req, secret) || {sub: anonJwtSub}
             
             let context  = await createContext(decoded.sub)
             context.jwt  = decoded.sub