mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
🐛 Fixed error when using staff access tokens
closes https://github.com/TryGhost/Team/issues/645
- we did some refactoring in [1] to turn promise chained code into
async/await, but this removed an early `return` from the code
- therefore we'd continue on to further code, which breaks for obscure
reasons that weren't apparent from the error
- this commit adds back a return at the end of the block where we handle
staff API tokens to match the same functionality as before
- this is regression that landed in 4.3.0 and would break staff user
tokens
[1]: b677927322 (diff-bc0bedcac8ec9646d0644c86a91e46f4759bc1b0c2aebac54a2b26ec474c3d15L148-L155)
This commit is contained in:
parent
858f48cf9d
commit
95651b33a6
1 changed files with 1 additions and 0 deletions
|
@ -164,6 +164,7 @@ const authenticateWithToken = async (req, res, next, {token, JWT_OPTIONS}) => {
|
|||
req.user = user;
|
||||
|
||||
next();
|
||||
return;
|
||||
}
|
||||
|
||||
// store the api key on the request for later checks and logging
|
||||
|
|
Loading…
Add table
Reference in a new issue