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

Function graphQLAuth

app/auth/auth.controller.js:27–38  ·  view source on GitHub ↗
(req, res)

Source from the content-addressed store, hash-verified

25 };
26
27 const graphQLAuth = async (req, res) => {
28 try {
29 res.status(200).send({
30 "X-Hasura-User-Id": `${req.user.id}`,
31 "X-Hasura-Role": "user",
32 "X-Hasura-Is-Owner": "false",
33 "Cache-Control": "max-age=86400"
34 });
35 } catch (err) {
36 res.sendStatus(401);
37 }
38 };
39
40 return {
41 generateKey,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected