fix:article get
This commit is contained in:
parent
24f6d18e44
commit
75e6981df0
|
|
@ -43,7 +43,7 @@ export async function getListArticle(props: PaginationRequest) {
|
||||||
}&category=${categorySlug || ""}&isBanner=${isBanner || ""}&categoryIds=${
|
}&category=${categorySlug || ""}&isBanner=${isBanner || ""}&categoryIds=${
|
||||||
categoryIds || ""
|
categoryIds || ""
|
||||||
}&createdByIds=${createdByIds || ""}&isPolda=${isPolda || ""}`,
|
}&createdByIds=${createdByIds || ""}&isPolda=${isPolda || ""}`,
|
||||||
headers
|
headers,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -65,9 +65,8 @@ export async function getListArticleAdminPage(props: PaginationRequest) {
|
||||||
} = props;
|
} = props;
|
||||||
const headers = {
|
const headers = {
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
Authorization: `Bearer ${token}`,
|
|
||||||
};
|
};
|
||||||
return await httpGet(
|
return await httpGetInterceptor(
|
||||||
`/articles?limit=${limit}&page=${page}&isPublish=${
|
`/articles?limit=${limit}&page=${page}&isPublish=${
|
||||||
isPublish === undefined ? "" : isPublish
|
isPublish === undefined ? "" : isPublish
|
||||||
}&title=${search}&startDate=${startDate || ""}&endDate=${
|
}&title=${search}&startDate=${startDate || ""}&endDate=${
|
||||||
|
|
@ -77,7 +76,7 @@ export async function getListArticleAdminPage(props: PaginationRequest) {
|
||||||
}&category=${categorySlug || ""}&isBanner=${isBanner || ""}&categoryIds=${
|
}&category=${categorySlug || ""}&isBanner=${isBanner || ""}&categoryIds=${
|
||||||
categoryIds || ""
|
categoryIds || ""
|
||||||
}&createdByIds=${createdByIds || ""}`,
|
}&createdByIds=${createdByIds || ""}`,
|
||||||
headers
|
headers,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,7 +92,7 @@ export async function getTopArticles(props: PaginationRequest) {
|
||||||
}&title=${search}&startDate=${startDate || ""}&endDate=${
|
}&title=${search}&startDate=${startDate || ""}&endDate=${
|
||||||
endDate || ""
|
endDate || ""
|
||||||
}&category=${category || ""}&sortBy=view_count&sort=desc`,
|
}&category=${category || ""}&sortBy=view_count&sort=desc`,
|
||||||
headers
|
headers,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,7 +135,7 @@ export async function getRecapArticleData(data: any) {
|
||||||
};
|
};
|
||||||
return await httpGet(
|
return await httpGet(
|
||||||
`/articles?page=${data.page}&userLevelId=${data.id}&startDate=${data.startDate}&endDate=${data.endDate}&startTime=${data.startTime}&endTime=${data.endTime}`,
|
`/articles?page=${data.page}&userLevelId=${data.id}&startDate=${data.startDate}&endDate=${data.endDate}&startTime=${data.startTime}&endTime=${data.endTime}`,
|
||||||
headers
|
headers,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -169,7 +168,7 @@ export async function getCategoryPagination(data: any) {
|
||||||
|
|
||||||
return await httpGet(
|
return await httpGet(
|
||||||
`/article-categories?limit=${data?.limit}&page=${data?.page}&title=${data?.search}`,
|
`/article-categories?limit=${data?.limit}&page=${data?.page}&title=${data?.search}`,
|
||||||
headers
|
headers,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -208,7 +207,7 @@ export async function getUserLevelDataStat(
|
||||||
startTime: string,
|
startTime: string,
|
||||||
endTime: string,
|
endTime: string,
|
||||||
levelType: string,
|
levelType: string,
|
||||||
levelId?: number
|
levelId?: number,
|
||||||
) {
|
) {
|
||||||
// const headers = {
|
// const headers = {
|
||||||
// "content-type": "application/json",
|
// "content-type": "application/json",
|
||||||
|
|
@ -217,7 +216,7 @@ export async function getUserLevelDataStat(
|
||||||
return await httpGetInterceptor(
|
return await httpGetInterceptor(
|
||||||
`/articles/statistic/user-levels?startDate=${startDate}&endDate=${endDate}&startTime=${startTime}&endTime=${endTime}&levelType=${levelType}&userLevelId=${
|
`/articles/statistic/user-levels?startDate=${startDate}&endDate=${endDate}&startTime=${startTime}&endTime=${endTime}&levelType=${levelType}&userLevelId=${
|
||||||
levelId || ""
|
levelId || ""
|
||||||
}`
|
}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -228,13 +227,13 @@ export async function getStatisticForMaps(startDate: string, endDate: string) {
|
||||||
};
|
};
|
||||||
return await httpGet(
|
return await httpGet(
|
||||||
`/activity-logs/visitors-by-region-stats?startDate=${startDate}&endDate=${endDate}`,
|
`/activity-logs/visitors-by-region-stats?startDate=${startDate}&endDate=${endDate}`,
|
||||||
headers
|
headers,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getStatisticVisitorsBrowser(
|
export async function getStatisticVisitorsBrowser(
|
||||||
startDate: string,
|
startDate: string,
|
||||||
endDate: string
|
endDate: string,
|
||||||
) {
|
) {
|
||||||
const headers = {
|
const headers = {
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
|
|
@ -242,7 +241,7 @@ export async function getStatisticVisitorsBrowser(
|
||||||
};
|
};
|
||||||
return await httpGet(
|
return await httpGet(
|
||||||
`/activity-logs/visitors-by-browser-stats?startDate=${startDate}&endDate=${endDate}`,
|
`/activity-logs/visitors-by-browser-stats?startDate=${startDate}&endDate=${endDate}`,
|
||||||
headers
|
headers,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export async function getStatisticMonthly(year: string) {
|
export async function getStatisticMonthly(year: string) {
|
||||||
|
|
@ -259,7 +258,7 @@ export async function getStatisticVisitorsMonthly(year: string) {
|
||||||
};
|
};
|
||||||
return await httpGet(
|
return await httpGet(
|
||||||
`/activity-logs/visitors-monthly-stats?year=${year}`,
|
`/activity-logs/visitors-monthly-stats?year=${year}`,
|
||||||
headers
|
headers,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export async function getStatisticUsersMonthly(year: string) {
|
export async function getStatisticUsersMonthly(year: string) {
|
||||||
|
|
@ -269,7 +268,7 @@ export async function getStatisticUsersMonthly(year: string) {
|
||||||
};
|
};
|
||||||
return await httpGet(
|
return await httpGet(
|
||||||
`/articles/statistic/monthly-per-user-level?year=${year}`,
|
`/articles/statistic/monthly-per-user-level?year=${year}`,
|
||||||
headers
|
headers,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export async function getStatisticMonthlyFeedback(year: string) {
|
export async function getStatisticMonthlyFeedback(year: string) {
|
||||||
|
|
@ -317,6 +316,6 @@ export async function getArticleByCategoryLanding(props: {
|
||||||
};
|
};
|
||||||
return await httpGet(
|
return await httpGet(
|
||||||
`/article-categories?limit=${props.limit}&title=${props.title}`,
|
`/article-categories?limit=${props.limit}&title=${props.title}`,
|
||||||
headers
|
headers,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue