aboutsummaryrefslogtreecommitdiff
path: root/src/app/anime/search/components/fetchInfo.js
blob: 07b203d6a3139ef84fcf13090cd4742e91bc39d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"use server";

export default async function Results(id) {
	return await testFunction(id);
}

async function testFunction(title) {
	const res = await fetch(
		"https://consumet-api-di2e.onrender.com/anime/gogoanime/" + title,
		{ cache: "force-cache" }
	);
	const data = await res.json();
	return data;
}