Sootzani-Inspector/utils/commonApi.ts

28 lines
608 B
TypeScript

import axios from "axios";
import { CookieValueTypes } from "cookies-next";
// Get Category
export async function getCategory() {
const data = await axios.get("api/Common/Categories");
return data.data;
}
// Get Captcha
export async function getCaptcha() {
const data = await axios.get("api/Common/Captcha", { responseType: "blob" });
return data;
}
// Get Captcha
export async function getContents() {
const data = await axios.get("api/Common/Contents");
return data.data;
}
export async function getOptions() {
const data = await axios.get("/api/Common/Options");
return data.data;
}