2024-02-13 01:47:26 -05:00
|
|
|
import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0';
|
|
|
|
|
|
|
|
export default withApiAuthRequired(async function products(req, res) {
|
|
|
|
const { accessToken } = await getAccessToken(req, res);
|
2024-05-21 22:35:19 -04:00
|
|
|
const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Artist', {
|
2024-02-13 01:47:26 -05:00
|
|
|
headers: {
|
2024-02-25 18:34:51 -05:00
|
|
|
"Authorization": `Bearer ${accessToken}`,
|
|
|
|
'Content-Type': 'application/json'
|
2024-02-13 23:25:57 -05:00
|
|
|
},
|
2024-02-25 18:34:51 -05:00
|
|
|
method: 'POST',
|
|
|
|
body: req.body
|
2024-02-13 01:47:26 -05:00
|
|
|
});
|
2024-02-13 23:25:57 -05:00
|
|
|
let result = await response.json();
|
|
|
|
res.status(200).json(result);
|
2024-02-13 01:47:26 -05:00
|
|
|
});
|
|
|
|
|