mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-11-09 04:38:49 +00:00
WIP: Mock API for providers and start rendering data
This commit is contained in:
6 files changed
+119
-1
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
import data from "../../../dataProviders.json";
|
||||
|
||||
export async function GET() {
|
||||
// Simulate fetching data with a delay
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||
|
||||
return NextResponse.json({ providers: data });
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import "server-only";
|
||||
|
||||
export default async function getProvider() {
|
||||
const res = await fetch("http://localhost:3000/api/providers");
|
||||
const product = await res.json();
|
||||
|
||||
return product;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./dataProvider";
|
||||
Reference in new issue
Block a user