MCPcopy Create free account
hub / github.com/CFBD/cfb-api / superPatreonAuth

Function superPatreonAuth

config/express.js:110–126  ·  view source on GitHub ↗
(req, res, next)

Source from the content-addressed store, hash-verified

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(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected