Merge pull request #202 from teaxyz/show-post-images

disable cache query for posts, to show images
This commit is contained in:
Neil 2023-02-14 12:10:39 +08:00 committed by GitHub
commit 10156b7086
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}