diff --git a/components/form/article/edit-article-form.tsx b/components/form/article/edit-article-form.tsx index 9628d46..ac6502b 100644 --- a/components/form/article/edit-article-form.tsx +++ b/components/form/article/edit-article-form.tsx @@ -221,7 +221,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) { async function initState() { loading(); - const res = await getArticleById(id); + const res = await getArticleById(id, getUnixTimestamp()); const data = res.data?.data; setDetailData(data); setValue("title", data?.title); diff --git a/services/article.ts b/services/article.ts index d835fec..71ee1b1 100644 --- a/services/article.ts +++ b/services/article.ts @@ -120,11 +120,11 @@ export async function updateArticle(id: string, data: any) { return await httpPut(pathUrl, headers, data); } -export async function getArticleById(id: any) { +export async function getArticleById(id: any, timeStamp: any) { const headers = { "content-type": "application/json", }; - return await httpGet(`/articles/${id}`, headers); + return await httpGet(`/articles/${id}?timeStamp=${timeStamp}`, headers); } export async function getRecapArticleData(data: any) { const headers = {