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

Function patreonAuth

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

Source from the content-addressed store, hash-verified

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) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected