#200 disable cache query for posts

This commit is contained in:
neil 2023-02-14 11:46:52 +08:00
parent ce59f48779
commit 1299bf77a8

View file

@ -79,7 +79,12 @@ export async function getTopPackages(): Promise<GUIPackage[]> {
export async function getAllPosts(tag?: string): Promise<AirtablePost[]> {
// add filter here someday: tag = news | course
const posts = await apiGet<AirtablePost[]>('posts', tag ? { tag } : {});
const queryParams = {
...(tag ? { tag } : {}),
nocache: 'true'
};
const posts = await apiGet<AirtablePost[]>('posts', queryParams);
console.log(posts);
return posts;
}