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