14 lines
427 B
TypeScript
Raw Normal View History

2024-02-13 01:47:26 -05:00
export default async function handler(req, res ): Promise<any> {
const { sellerId } = req.query;
var url = process.env.NEXT_PUBLIC_API_URL+`/api/Discovery/Sellers/${sellerId}/Portfolio`;
2024-02-15 21:49:12 -05:00
(url)
2024-02-13 01:47:26 -05:00
const response = await fetch(url);
if (!response.ok) {
throw new Error('Failed to fetch seller portfolio');
}
var result = await response.json();
2024-02-15 21:49:12 -05:00
(result)
2024-02-13 01:47:26 -05:00
res.status(200).json(result);
}