26 lines
656 B
TypeScript
26 lines
656 B
TypeScript
|
|
import {
|
||
|
|
httpGetInterceptor,
|
||
|
|
httpPostInterceptor,
|
||
|
|
} from "../http-config/http-interceptor-service";
|
||
|
|
|
||
|
|
export async function paginationReport(
|
||
|
|
size: any,
|
||
|
|
page: number,
|
||
|
|
title: string = "",
|
||
|
|
categoryFilter: any,
|
||
|
|
statusFilter: any
|
||
|
|
) {
|
||
|
|
return await httpGetInterceptor(
|
||
|
|
`/media/report/list?enablePage=1&page=${page}&size=${size}&title=${title}&categoryId=${categoryFilter}&statusId=${statusFilter}`
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function getPreviewById(id: any) {
|
||
|
|
return await httpGetInterceptor(`/media/report/view?id=${id}`);
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function saveReport(data: any) {
|
||
|
|
const url = "/media/report";
|
||
|
|
return httpPostInterceptor(url, data);
|
||
|
|
}
|