From 842266fdf8655c3743d579120c55397db3b0060b Mon Sep 17 00:00:00 2001 From: SrGooglo Date: Thu, 18 May 2023 19:55:48 +0000 Subject: [PATCH] fix some methods having bad namings --- packages/comty.js/src/models/post/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/comty.js/src/models/post/index.js b/packages/comty.js/src/models/post/index.js index c03d15b2..96929e72 100755 --- a/packages/comty.js/src/models/post/index.js +++ b/packages/comty.js/src/models/post/index.js @@ -50,7 +50,7 @@ export default class Post { throw new Error("Post ID and/or comment are required") } - const request = await request({ + const { data } = await request({ method: "POST", url: `/comments/post/${post_id}`, data: { @@ -58,7 +58,7 @@ export default class Post { }, }) - return request + return data } 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") } - const request = await request({ + const { data } = await request({ method: "DELETE", url: `/comments/post/${post_id}/${comment_id}`, }) - return request + return data } static getExplorePosts = async ({ trim, limit }) => {