Download next.js/examples/blog-with-comment/lib/getUser.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 315 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/blog-with-comment/lib/getUser.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/blog-with-comment/lib/getUser.ts
-
curl -L -o getUser.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/blog-with-comment/lib/getUser.ts
315 Bytes
| export default async function getUser(token: string) { | |
| const response = await fetch( | |
| `https://${process.env.NEXT_PUBLIC_AUTH0_DOMAIN}/userinfo`, | |
| { | |
| headers: { | |
| Authorization: `Bearer ${token}`, | |
| "Content-Type": "application/json", | |
| }, | |
| }, | |
| ); | |
| return await response.json(); | |
| } | |