blob: eb13c26f8657fc17bf1e0fab8fa1574b22fecc82 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
"use server";
export async function fetchAnimeInfo(title) {
const res = await fetch(
"https://consumet-api-di2e.onrender.com/movies/dramacool/" + title
);
const data = await res.json();
return data;
}
export async function fetchDramaInfo(id) {
const res = (
await fetch(
`https://consumet-api-di2e.onrender.com/movies/dramacool/info?id=${id}`
)
).json();
return res;
}
export async function fetchVideoLinks(drama_id, episode_id) {
const res = (
await fetch(
`https://consumet-api-di2e.onrender.com/movies/dramacool/watch?episodeId=${episode_id}&mediaId=${drama_id}`
)
).json();
return res;
}
|