mirror of
https://github.com/D4M13N-D3V/comissions-app-ui.git
synced 2025-03-13 07:45:07 +00:00
17 lines
585 B
TypeScript
17 lines
585 B
TypeScript
import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0';
|
|
|
|
export default withApiAuthRequired(async function handler(req, res) {
|
|
const { accessToken } = await getAccessToken(req, res);
|
|
const { requestId } = req.query;
|
|
const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtistRequests/'+requestId, {
|
|
headers: {
|
|
"Authorization": `Bearer ${accessToken}`,
|
|
},
|
|
method: req.method
|
|
});
|
|
console.log(response)
|
|
let result = await response.json();
|
|
res.status(200).json(result);
|
|
});
|
|
|
|
// handles ACCEPT AND DENY
|