2024-12-09 16:09:42 +00:00
|
|
|
import { httpGetInterceptor } from "../http-config/http-interceptor-service";
|
|
|
|
|
|
|
|
|
|
export async function getHeroData() {
|
|
|
|
|
return await httpGetInterceptor(`media/public/list?enablePage=1&sort=desc&sortBy=createdAt&size=5&page=0&typeId=1&title=&categoryId=&fileFormats=&tags=&group=&startDate=&endDate=&month=&year=`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getCategoryData() {
|
|
|
|
|
return await httpGetInterceptor(`media/categories/list/publish?enablePage=1&sort=desc&sortBy=updatedAt&size=12&type=`);
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-13 06:55:30 +00:00
|
|
|
export async function getListContent(props: any) {
|
2024-12-12 15:27:00 +00:00
|
|
|
return await httpGetInterceptor(
|
2024-12-28 11:42:10 +00:00
|
|
|
`media/public/list?enablePage=1&sort=desc&sortBy=${props.sortBy}&size=${props.size}&page=${props.page}&typeId=${props.contentTypeId}&title=${
|
|
|
|
|
props.title ? props.title : ""
|
|
|
|
|
}&categoryId=&fileFormats=&tags=&group=&startDate=&endDate=&month=&year=`
|
2024-12-12 15:27:00 +00:00
|
|
|
);
|
2024-12-09 16:09:42 +00:00
|
|
|
}
|
2024-12-10 13:51:14 +00:00
|
|
|
|
|
|
|
|
export async function getPrivacy() {
|
|
|
|
|
return await httpGetInterceptor(`general/privacy-policy/1`);
|
|
|
|
|
}
|
2024-12-12 15:27:00 +00:00
|
|
|
|
|
|
|
|
export async function getIndeksData() {
|
|
|
|
|
return await httpGetInterceptor(`blog/public/pagination?enablePage=1&page=0&size=20`);
|
|
|
|
|
}
|
2024-12-13 14:33:59 +00:00
|
|
|
|
|
|
|
|
export async function getDetail(slug: string) {
|
|
|
|
|
return await httpGetInterceptor(`media/public?slug=${slug}&state=mabes`);
|
2024-12-18 16:28:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getDetailIndeks() {
|
|
|
|
|
return await httpGetInterceptor(`blog/public/pagination?enablePage=1&page=0&size=6`);
|
|
|
|
|
}
|
2024-12-19 15:20:03 +00:00
|
|
|
|
|
|
|
|
export async function getFeedback() {
|
|
|
|
|
return await httpGetInterceptor(`master/feedback/list`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function postUserFeedback() {
|
|
|
|
|
return await httpGetInterceptor(`feedback/user`);
|
|
|
|
|
}
|
2024-12-23 15:40:32 +00:00
|
|
|
|
|
|
|
|
export async function listCategory(type = "") {
|
|
|
|
|
return await httpGetInterceptor(`media/categories/list/enable?enablePage=1&sort=desc&sortBy=updatedAt&size=12&type=${type}`);
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-24 16:16:20 +00:00
|
|
|
export async function publicDetailBlog(slug: any) {
|
|
|
|
|
return await httpGetInterceptor(`blog/public/read/${slug}`);
|
|
|
|
|
}
|
2024-12-26 15:03:45 +00:00
|
|
|
|
|
|
|
|
export async function listData(type: string, search: string, category: string, size = 10, page = 0, sortBy = "createdAt", format = "", tag = "", group = "", startDate = "", endDate = "", month = "", year = "") {
|
|
|
|
|
return await httpGetInterceptor(
|
|
|
|
|
`media/public/list?enablePage=1&sort=desc&sortBy=${sortBy}&size=${size}&page=${page}&typeId=${type}&title=${search}&categoryId=${category}&fileFormats=${format}&tags=${tag}&group=${group}&startDate=${startDate}&endDate=${endDate}&month=${month}&year=${year}`
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function listDataRegional(type: string, search: string, category: string, format = "", tag = "", startDate = "", endDate = "", month = "", year = "", size = 10, page = 0, sortBy = "createdAt") {
|
|
|
|
|
return await httpGetInterceptor(
|
|
|
|
|
`media/public/regional-list?enablePage=1&size=${size}&page=${page}&sort=desc&sortBy=${sortBy}&typeId=${type}&title=${search}&categoryId=${category}&fileFormats=${format}&tags=${tag}&startDate=${startDate}&endDate=${endDate}&month=${month}&year=${year}`
|
|
|
|
|
);
|
|
|
|
|
}
|
2024-12-28 11:42:10 +00:00
|
|
|
|
|
|
|
|
export async function getUserLevelListByParent(id: any) {
|
|
|
|
|
return await httpGetInterceptor(`users/user-levels/list?userLevelId=${id}`);
|
|
|
|
|
}
|
2024-12-30 16:00:25 +00:00
|
|
|
|
|
|
|
|
export async function getInfoProfile() {
|
|
|
|
|
return await httpGetInterceptor(`users/info`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getListPorvinces() {
|
|
|
|
|
return await httpGetInterceptor(`public/users/provinces`)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getUsersTeams(id: any) {
|
|
|
|
|
return await httpGetInterceptor(`users?instituteId=${id}`)
|
|
|
|
|
}
|