2024-04-19 13:26:27 +00:00
|
|
|
import { httpGet, httpPost } from "./http-config/axios-base-service";
|
2024-04-04 10:30:07 +00:00
|
|
|
|
|
|
|
|
export async function getListArticle() {
|
|
|
|
|
const headers = {
|
|
|
|
|
"content-type": "application/json",
|
|
|
|
|
};
|
|
|
|
|
return await httpGet(`/articles`, headers);
|
2024-04-19 13:26:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function createArticle(data: any) {
|
|
|
|
|
const pathUrl = `/articles`;
|
|
|
|
|
return await httpPost(pathUrl, data);
|
2024-04-04 10:30:07 +00:00
|
|
|
}
|