This commit is contained in:
Tejas Panchal
2025-07-24 21:31:38 +05:30
parent d502d2dbc5
commit 9f256d4254
116 changed files with 0 additions and 17816 deletions

View File

@@ -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;