(req, res, next)
| 90 | }; |
| 91 | |
| 92 | const patreonAuth = (req, res, next) => { |
| 93 | passport.authenticate("bearer", (err, user, info) => { |
| 94 | if ( |
| 95 | (user && user.patronLevel && user.patronLevel > 0) || |
| 96 | env == "development" |
| 97 | ) { |
| 98 | req.user = user; |
| 99 | next(); |
| 100 | } else { |
| 101 | res |
| 102 | .status(401) |
| 103 | .send( |
| 104 | "This endpoint is in limited beta and requires a Patreon subscription." |
| 105 | ); |
| 106 | } |
| 107 | })(req, res, next); |
| 108 | }; |
| 109 | |
| 110 | const superPatreonAuth = (req, res, next) => { |
| 111 | passport.authenticate("bearer", (err, user, info) => { |
nothing calls this directly
no outgoing calls
no test coverage detected