Correcting a temp value and adding a fallback for unauthenticated users
This commit is contained in:
1 parent
ad421426d5
commit
796338539f
1 file changed
+3
-1
+3
-1
@@ -94,7 +94,7 @@ async function run () {
|
||||
)
|
||||
|
||||
app.use('/graphql', (req, res, next) => {
|
||||
res.locals.userId = 'haha'
|
||||
res.locals.userId = ''
|
||||
if (req.user) {
|
||||
getUserId(req.user.sub)
|
||||
.then(data => {
|
||||
@@ -105,6 +105,8 @@ async function run () {
|
||||
res.locals.error = err
|
||||
next()
|
||||
})
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user