mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 18:36:21 +00:00
10 lines
288 B
TypeScript
10 lines
288 B
TypeScript
import axios from 'axios';
|
|
|
|
export default async function fetch_posts_list(): Promise<any> {
|
|
const response = await axios(`${ process.env.BACKEND_URL }/get_post_list`);
|
|
if (response.status !== 200) {
|
|
throw new Error(response.statusText);
|
|
}
|
|
return response.data;
|
|
}
|