mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
fix some methods having bad namings
This commit is contained in:
parent
5c9ffb766c
commit
842266fdf8
@ -50,7 +50,7 @@ export default class Post {
|
|||||||
throw new Error("Post ID and/or comment are required")
|
throw new Error("Post ID and/or comment are required")
|
||||||
}
|
}
|
||||||
|
|
||||||
const request = await request({
|
const { data } = await request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `/comments/post/${post_id}`,
|
url: `/comments/post/${post_id}`,
|
||||||
data: {
|
data: {
|
||||||
@ -58,7 +58,7 @@ export default class Post {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
return request
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
static deleteComment = async ({ post_id, comment_id }) => {
|
static deleteComment = async ({ post_id, comment_id }) => {
|
||||||
@ -66,12 +66,12 @@ export default class Post {
|
|||||||
throw new Error("Post ID and/or comment ID are required")
|
throw new Error("Post ID and/or comment ID are required")
|
||||||
}
|
}
|
||||||
|
|
||||||
const request = await request({
|
const { data } = await request({
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
url: `/comments/post/${post_id}/${comment_id}`,
|
url: `/comments/post/${post_id}/${comment_id}`,
|
||||||
})
|
})
|
||||||
|
|
||||||
return request
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
static getExplorePosts = async ({ trim, limit }) => {
|
static getExplorePosts = async ({ trim, limit }) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user