(req, res, next)
| 108 | }; |
| 109 | |
| 110 | const superPatreonAuth = (req, res, next) => { |
| 111 | passport.authenticate("bearer", (err, user, info) => { |
| 112 | if ( |
| 113 | (user && user.patronLevel && user.patronLevel > 1) || |
| 114 | env == "development" |
| 115 | ) { |
| 116 | req.user = user; |
| 117 | next(); |
| 118 | } else { |
| 119 | res |
| 120 | .status(401) |
| 121 | .send( |
| 122 | "This endpoint is in limited beta and requires a Patreon Tier 2 subscription." |
| 123 | ); |
| 124 | } |
| 125 | })(req, res, next); |
| 126 | }; |
| 127 | |
| 128 | require("./swagger")(app, cors); |
| 129 | app.use( |
nothing calls this directly
no outgoing calls
no test coverage detected