fix: issues
This commit is contained in:
@@ -2,7 +2,7 @@ import httpClient from './httpClient';
|
||||
|
||||
export const postService = {
|
||||
getPosts({ page = 1, limit = 10, keyword = '' } = {}) {
|
||||
return httpClient.get('/admin/posts', {
|
||||
return httpClient.get('/posts', {
|
||||
params: {
|
||||
page,
|
||||
limit,
|
||||
@@ -11,19 +11,19 @@ export const postService = {
|
||||
});
|
||||
},
|
||||
getPost(id) {
|
||||
return httpClient.get(`/admin/posts/${id}`);
|
||||
return httpClient.get(`/posts/${id}`);
|
||||
},
|
||||
createPost(post) {
|
||||
return httpClient.post('/admin/posts', post);
|
||||
return httpClient.post('/posts', post);
|
||||
},
|
||||
|
||||
updatePost(id, post) {
|
||||
return httpClient.put(`/admin/posts/${id}`, post);
|
||||
return httpClient.put(`/posts/${id}`, post);
|
||||
},
|
||||
deletePost(id) {
|
||||
return httpClient.delete(`/admin/posts/${id}`);
|
||||
return httpClient.delete(`/posts/${id}`);
|
||||
},
|
||||
sendTo(id, userId) {
|
||||
return httpClient.post(`/admin/posts/${id}/send-to/${userId}`);
|
||||
return httpClient.post(`/posts/${id}/send-to/${userId}`);
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user