2024-12-10 18:03:36 +00:00
|
|
|
import {
|
2025-05-19 01:24:48 +00:00
|
|
|
httpDeleteInterceptor,
|
2024-12-10 18:03:36 +00:00
|
|
|
httpGetInterceptor,
|
2024-12-31 08:14:22 +00:00
|
|
|
httpPostInterceptor,
|
2024-12-10 18:03:36 +00:00
|
|
|
} from "../http-config/http-interceptor-service";
|
|
|
|
|
|
2024-12-10 18:04:03 +00:00
|
|
|
export async function getKnowledgeBaseCategoryList() {
|
|
|
|
|
const url = `knowledge-base/category/list`;
|
|
|
|
|
return httpGetInterceptor(url);
|
2024-12-10 18:03:36 +00:00
|
|
|
}
|
|
|
|
|
|
2024-12-10 18:04:03 +00:00
|
|
|
export async function getKnowledgeBaseList(id: number) {
|
|
|
|
|
const url = `knowledge-base?categoryId=${id}`;
|
|
|
|
|
return httpGetInterceptor(url);
|
2024-12-10 18:03:36 +00:00
|
|
|
}
|
2024-12-31 08:14:22 +00:00
|
|
|
|
|
|
|
|
export async function saveKnowledgeBaseCategory(data: any) {
|
2025-05-19 01:24:48 +00:00
|
|
|
const url = "knowledge-base/category";
|
2024-12-31 08:14:22 +00:00
|
|
|
return httpPostInterceptor(url, data);
|
2025-05-19 01:24:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function deleteKnowledgeBase(id: any) {
|
|
|
|
|
const url = `knowledge-base?id=${id}`;
|
|
|
|
|
return httpDeleteInterceptor(url);
|
|
|
|
|
}
|
2025-06-24 06:33:38 +00:00
|
|
|
|
|
|
|
|
export async function saveKnowledgeBase(data: any) {
|
|
|
|
|
const url = "knowledge-base";
|
|
|
|
|
return httpPostInterceptor(url, data);
|
|
|
|
|
}
|