18 lines
527 B
TypeScript
Raw Permalink Normal View History

2024-02-13 23:25:57 -05:00
import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0';
2024-02-14 21:14:25 -05:00
export default withApiAuthRequired(async function onboardUrl(req, res) {
2024-02-13 23:25:57 -05:00
const { accessToken } = await getAccessToken(req, res);
const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Artist/Onboard', {
2024-02-13 23:25:57 -05:00
headers: {
"Authorization": `Bearer ${accessToken}`
}
});
if(response.ok==false){
res.status(200).json({})
return;
}
2024-02-13 23:25:57 -05:00
let result = await response.json();
res.status(200).json(result);
});