38 lines
952 B
TypeScript
38 lines
952 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;
|
|
}
|
|
|
|
export async function getOrganizations() {
|
|
const data = await axios.get("api/Common/Organizations");
|
|
return data.data;
|
|
}
|
|
|
|
// Get Captcha
|
|
export async function getCaptcha() {
|
|
const data = await axios.get("api/Common/Captcha", { responseType: "blob" });
|
|
console.log(data);
|
|
return data;
|
|
}
|
|
|
|
export async function getSliders() {
|
|
const data = await axios.get("api/Common/Sliders");
|
|
console.log(data);
|
|
return data.data;
|
|
}
|
|
|
|
export async function getWebContents() {
|
|
const data = await axios.get("api/Common/Contents");
|
|
console.log(data);
|
|
return data.data;
|
|
}
|
|
|
|
export async function getSingleWebContents( title: string ) {
|
|
const data = await axios.get(`api/Common/Contents/${title}`);
|
|
console.log(data);
|
|
return data.data;
|
|
} |