Skip to content

Commit

Permalink
fix(spell): fix spell error;
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Jul 23, 2021
1 parent ff468f9 commit 31a93c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/router/file/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ FileRouter.post('/upload/:namespace', uploader.single('file'), async (req, res)
return res.status(401).send('Unauthorized')
}

const prasedToken = parseToken(uploadToken as string)
if (!prasedToken) {
const parsedToken = parseToken(uploadToken as string)
if (!parsedToken) {
return res.status(403).send('Invalid upload token')
}

if (!['create', 'all'].includes(prasedToken?.op)) {
if (!['create', 'all'].includes(parsedToken?.op)) {
return res.status(403).send('Permission denied')
}

if (prasedToken?.ns != namespace) {
if (parsedToken?.ns != namespace) {
return res.status(403).send('Permission denied')
}
}
Expand Down

0 comments on commit 31a93c5

Please sign in to comment.