62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
import {
|
|
httpDeleteInterceptor,
|
|
httpGetInterceptor,
|
|
httpPostInterceptor,
|
|
} from "../http-config/http-interceptor-service";
|
|
|
|
export async function detailMedia(id: any) {
|
|
const url = `articles?id=${id}`;
|
|
return httpGetInterceptor(url);
|
|
}
|
|
|
|
export async function listCuratedContent(
|
|
title: string = "",
|
|
limit: any,
|
|
page: any,
|
|
typeId: any,
|
|
curationType: any
|
|
// categoryId = ""
|
|
) {
|
|
const url = `media/curation/list?title=${title}&enablePage=1&sortBy=createdAt&sort=desc&size=${limit}&page=${page}&typeId=${typeId}&curationType=${curationType}`;
|
|
return httpGetInterceptor(url);
|
|
}
|
|
|
|
export async function getMediaCurationMessage(id: any) {
|
|
const url = `media/curation/message/list?mediaFileId=${id}`;
|
|
return httpGetInterceptor(url);
|
|
}
|
|
|
|
export async function saveMediaCurationMessage(data: any) {
|
|
const url = "media/curation/message";
|
|
return httpPostInterceptor(url, data);
|
|
}
|
|
|
|
export async function deleteMediaCurationMessage(id: any) {
|
|
const url = `media/curation/message?id=${id}`;
|
|
return httpDeleteInterceptor(url);
|
|
}
|
|
|
|
export async function getSuggestionList(id: number | string) {
|
|
const url = `media/suggestion?mediaId=${id}`;
|
|
return httpGetInterceptor(url);
|
|
}
|
|
|
|
export async function createSuggestion(data: any) {
|
|
const url = "media/suggestion";
|
|
return httpPostInterceptor(url, data);
|
|
}
|
|
|
|
export async function deleteSuggestion(id: number | string) {
|
|
const url = `media/suggestion?id=${id}`;
|
|
return httpDeleteInterceptor(url);
|
|
}
|
|
|
|
export async function getDataApprovalByMediaUpload(id: number | string) {
|
|
const url = `media/approval?mediaUploadId=${id}`;
|
|
return httpGetInterceptor(url);
|
|
}
|
|
export async function getDataApprovalHistory(id: number | string) {
|
|
const url = `media/approval/history?id=${id}`;
|
|
return httpGetInterceptor(url);
|
|
}
|