comty.js 0.52.0 → 0.52.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -29,14 +29,14 @@ var _request = require('../../handlers/request'); var _request2 = _interopRequir
|
|
|
29
29
|
return response.data
|
|
30
30
|
}}
|
|
31
31
|
|
|
32
|
-
static __initStatic3() {this.
|
|
32
|
+
static __initStatic3() {this.toggleFollow = async ({ user_id, username }) => {
|
|
33
33
|
if (!user_id && !username) {
|
|
34
34
|
throw new Error("user_id or username is required")
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const response = await _request2.default.call(void 0, {
|
|
38
38
|
method: "POST",
|
|
39
|
-
url: "/follow/user/
|
|
39
|
+
url: "/follow/user/toggle",
|
|
40
40
|
data: {
|
|
41
41
|
user_id: user_id,
|
|
42
42
|
username: username
|
|
@@ -118,27 +118,27 @@ var _withSettings = require('../../helpers/withSettings'); var _withSettings2 =
|
|
|
118
118
|
return data
|
|
119
119
|
}}
|
|
120
120
|
|
|
121
|
-
static __initStatic9() {this.
|
|
121
|
+
static __initStatic9() {this.toggleLike = async ({ post_id }) => {
|
|
122
122
|
if (!post_id) {
|
|
123
123
|
throw new Error("Post ID is required")
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
const { data } = await _request2.default.call(void 0, {
|
|
127
127
|
method: "POST",
|
|
128
|
-
url: `/posts/${post_id}/
|
|
128
|
+
url: `/posts/${post_id}/toggle_like`,
|
|
129
129
|
})
|
|
130
130
|
|
|
131
131
|
return data
|
|
132
132
|
}}
|
|
133
133
|
|
|
134
|
-
static __initStatic10() {this.
|
|
134
|
+
static __initStatic10() {this.toggleSave = async ({ post_id }) => {
|
|
135
135
|
if (!post_id) {
|
|
136
136
|
throw new Error("Post ID is required")
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
const { data } = await _request2.default.call(void 0, {
|
|
140
140
|
method: "POST",
|
|
141
|
-
url: `/posts/${post_id}/
|
|
141
|
+
url: `/posts/${post_id}/toggle_save`,
|
|
142
142
|
})
|
|
143
143
|
|
|
144
144
|
return data
|