47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
import {
|
|
httpGetInterceptor,
|
|
httpPostInterceptor,
|
|
} from "../http-config/http-interceptor-service";
|
|
|
|
export async function getMediaTrackingMonitoring(page: number, size: number) {
|
|
const url = `cekmedsos/monitoring/pagination?page=${page}&size=${size}`;
|
|
return httpGetInterceptor(url);
|
|
}
|
|
|
|
export async function sendMediaUploadToEmail(data: any) {
|
|
const url = "media/public/share-to-email";
|
|
return httpPostInterceptor(url, data);
|
|
}
|
|
|
|
export async function mediaTrackingSave(data: any) {
|
|
const url = `/media/tracking/monitoring`;
|
|
return httpPostInterceptor(url, data);
|
|
}
|
|
|
|
export async function getMediaTracking(data: any) {
|
|
// const url = `/media/tracking/monitoring/pagination`;
|
|
const url = `/media/tracking/monitoring/pagination?enablePagination=1&page=${
|
|
data.page || 0
|
|
}&size=${data?.size || 10}`;
|
|
return httpGetInterceptor(url);
|
|
}
|
|
export async function getMediaTrackingResult(data: any) {
|
|
// const url = `/media/tracking/monitoring/pagination`;
|
|
const url = `/media/tracking/monitoring/results/pagination?trackingId=${
|
|
data.id || ""
|
|
}`;
|
|
return httpGetInterceptor(url);
|
|
}
|
|
|
|
export async function listData5Data() {
|
|
return await httpGetInterceptor(
|
|
`media/public/list?enablePage=1&sort=desc&size=5`
|
|
);
|
|
}
|
|
|
|
export async function listDataAllNonPagination(search: string) {
|
|
return await httpGetInterceptor(
|
|
`media/public/list?enablePage=0&sort=desc&title=${search || ""}`
|
|
);
|
|
}
|