feat(post) add header, fix style

This commit is contained in:
lumither committed 2024-07-18 21:02:37 +08:00
1 parent d982bf0548
commit de27479242
12 files changed
+194 -59

No files matched your search

+2 -1
View File
@@ -1,7 +1,8 @@
import axios from 'axios';
export default async function fetch_posts_list(): Promise<any> {
const response = await axios(`${ process.env.BACKEND_URL }/get_post_list`);
const request_url = `${ process.env.BACKEND_URL }/get_post_list`;
const response = await axios(request_url);
if (response.status !== 200) {
throw new Error(response.statusText);
}