comment blog
This commit is contained in:
@@ -53,3 +53,15 @@ export const deleteBlog = async (id: string) => {
|
||||
const { data } = await axios.delete(`/blogs/${id}`);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getBlogComments = async () => {
|
||||
const { data } = await axios.get("/blogs/comments");
|
||||
return data;
|
||||
};
|
||||
|
||||
export const changeStatusComment = async (id: string, status: string) => {
|
||||
const { data } = await axios.patch(`/blogs/comments/${id}/status`, {
|
||||
status,
|
||||
});
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user