36 lines
951 B
TypeScript
36 lines
951 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);
|
|
}
|
|
|
|
export async function getUserReports(id: any) {
|
|
const url = `users/reports?id=${id}`;
|
|
return httpGetInterceptor(url);
|
|
}
|
|
|
|
export async function saveUserReportsAction(id: any, action: any) {
|
|
const url = `users/reports/action?id=${id}&action=${action}`;
|
|
return httpPostInterceptor(url);
|
|
}
|