mirror of
https://github.com/JustAnimeCore/JustAnime.git
synced 2026-04-18 06:11:45 +00:00
freshhhh
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
import axios from "axios";
|
||||
|
||||
const getQtip = async (id) => {
|
||||
try {
|
||||
let workerUrls = import.meta.env.VITE_WORKER_URL?.split(",");
|
||||
let baseUrl = workerUrls?.length
|
||||
? workerUrls[Math.floor(Math.random() * workerUrls.length)]
|
||||
: import.meta.env.VITE_API_URL;
|
||||
if (!baseUrl) throw new Error("No API endpoint defined.");
|
||||
const response = await axios.get(`${baseUrl}/qtip/${id.split("-").pop()}`);
|
||||
return response.data.results;
|
||||
} catch (err) {
|
||||
console.error("Error fetching genre info:", err);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
export default getQtip;
|
||||
Reference in New Issue
Block a user