feat:timestamp for detail
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Rama Priyanto 2026-02-27 09:05:55 +07:00
parent caba909562
commit eb77a23bc9
2 changed files with 3 additions and 3 deletions

View File

@ -221,7 +221,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) {
async function initState() { async function initState() {
loading(); loading();
const res = await getArticleById(id); const res = await getArticleById(id, getUnixTimestamp());
const data = res.data?.data; const data = res.data?.data;
setDetailData(data); setDetailData(data);
setValue("title", data?.title); setValue("title", data?.title);

View File

@ -120,11 +120,11 @@ export async function updateArticle(id: string, data: any) {
return await httpPut(pathUrl, headers, data); return await httpPut(pathUrl, headers, data);
} }
export async function getArticleById(id: any) { export async function getArticleById(id: any, timeStamp: any) {
const headers = { const headers = {
"content-type": "application/json", "content-type": "application/json",
}; };
return await httpGet(`/articles/${id}`, headers); return await httpGet(`/articles/${id}?timeStamp=${timeStamp}`, headers);
} }
export async function getRecapArticleData(data: any) { export async function getRecapArticleData(data: any) {
const headers = { const headers = {