Skip to content

Commit

Permalink
feat: add ensureFastify
Browse files Browse the repository at this point in the history
  • Loading branch information
gcandal committed Jan 8, 2021
1 parent 5cd784e commit e26601b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/express/auth.js
Expand Up @@ -6,4 +6,10 @@ export const ensureExpress = token => {
};
};

export const ensureFastify = token => {
return (req, res, next) => {
ensurePermissions(token, req).catch(next).then(next);
};
};

export default ensureExpress;

0 comments on commit e26601b

Please sign in to comment.