mirror of
https://github.com/D4M13N-D3V/comissions-app-ui.git
synced 2025-03-14 08:15:08 +00:00
14 lines
461 B
TypeScript
14 lines
461 B
TypeScript
![]() |
import { useRouter } from 'next/router'
|
||
|
|
||
|
|
||
|
export default async function handler(req, res ): Promise<any> {
|
||
|
const { artistName } = req.query;
|
||
|
var url = process.env.NEXT_PUBLIC_API_URL+`/api/Discovery/Artists/${artistName}/Page`;
|
||
|
const response = await fetch(url);
|
||
|
//console.log(response)
|
||
|
if (!response.ok) {
|
||
|
throw new Error('Failed to fetch seller');
|
||
|
}
|
||
|
let result = await response.json();
|
||
|
res.status(200).json(result);
|
||
|
}
|