mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
11 lines
325 B
TypeScript
11 lines
325 B
TypeScript
import axios from 'axios';
|
|
|
|
export default async function fetch_posts_list(): Promise<any> {
|
|
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);
|
|
}
|
|
return response.data;
|
|
}
|