feat: add post page
This commit is contained in:
12
frontend/admin/src/api/postService.js
Normal file
12
frontend/admin/src/api/postService.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import httpClient from './httpClient';
|
||||
|
||||
export const postService = {
|
||||
getPosts({ page = 1, limit = 10 } = {}) {
|
||||
return httpClient.get('/admin/posts', {
|
||||
params: { page, limit }
|
||||
});
|
||||
},
|
||||
getPost(id) {
|
||||
return httpClient.get(`/admin/posts/${id}`);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user