feat:timestamp for detail
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
caba909562
commit
eb77a23bc9
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue