update post fetcher

This commit is contained in:
DefectingCat
2023-05-18 09:55:23 +08:00
parent b234c81d6a
commit 4e5a72df99
2 changed files with 10 additions and 1 deletions

9
lib/postsFetcher.ts Normal file
View File

@ -0,0 +1,9 @@
const baseUrl = 'https://blog-backend-beige-pi.vercel.app/';
/**
* Read post meta info from backend
*/
const readFileMate = async (filename: string) => {
const target = `${baseUrl}/${filename}.mdx`;
const result = await (await fetch(target)).text();
};