aboutsummaryrefslogtreecommitdiff
path: root/src/app/search/components/fetchInfo.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/search/components/fetchInfo.js')
-rw-r--r--src/app/search/components/fetchInfo.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/app/search/components/fetchInfo.js b/src/app/search/components/fetchInfo.js
new file mode 100644
index 0000000..f843dff
--- /dev/null
+++ b/src/app/search/components/fetchInfo.js
@@ -0,0 +1,14 @@
+"use server";
+
+export default async function Results(id) {
+ return await testFunction(id);
+}
+
+async function testFunction(title) {
+ const res = await fetch(
+ "https://dramalama-api.vercel.app/anime/gogoanime/" + title,
+ { cache: "force-cache" }
+ );
+ const data = await res.json();
+ return data;
+}