beamsocial 0.19.1 → 0.19.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.
@@ -123,7 +123,7 @@ export class User {
123
123
  if (res.status == 200) {
124
124
  this.followers += 1;
125
125
  }
126
- else if (res.status == 206) {
126
+ else if (res.status == 202) {
127
127
  (_a = this.__session) === null || _a === void 0 ? void 0 : _a.relations.outgoing.push(this.id);
128
128
  }
129
129
  return;
@@ -156,7 +156,9 @@ export class User {
156
156
  const res = yield axios.post(this.__url + `/unfollow`, {}, {
157
157
  withCredentials: true,
158
158
  });
159
- this.followers -= 1;
159
+ if (res.status == 200) {
160
+ this.followers -= 1;
161
+ }
160
162
  return;
161
163
  }
162
164
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beamsocial",
3
- "version": "0.19.1",
3
+ "version": "0.19.2",
4
4
  "type": "module",
5
5
  "description": "API-wrapper pour Beam",
6
6
  "main": "index.js",