web-humas-fe/service/article.ts

13 lines
361 B
TypeScript

import { httpGet, httpPost } from "./http-config/axios-base-service";
export async function getListArticle() {
const headers = {
"content-type": "application/json",
};
return await httpGet(`/articles`, headers);
}
export async function createArticle(data: any) {
const pathUrl = `/articles`;
return await httpPost(pathUrl, data);
}