@communecter/cocolight-api-client 1.0.113 → 1.0.114

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@communecter/cocolight-api-client",
3
- "version": "1.0.113",
3
+ "version": "1.0.114",
4
4
  "description": "Client Axios simplifié pour l'API cocolight",
5
5
  "repository": {
6
6
  "type": "git",
package/src/api/User.ts CHANGED
@@ -1222,9 +1222,15 @@ export class User extends BaseEntity<UserItemNormalized> {
1222
1222
  } catch{
1223
1223
  return false;
1224
1224
  }
1225
- const parentLink = this._getParentLinkForUser();
1226
- if (!parentLink) return false;
1227
- return parentLink?.isInviting === true;
1225
+ if(this.getEntityType() === "citoyens"){
1226
+ const userLink = this._getLinkFromConnectedUser();
1227
+ if (!userLink) return false;
1228
+ return userLink?.isInviting === true;
1229
+ } else {
1230
+ const parentLink = this._getParentLinkForUser();
1231
+ if (!parentLink) return false;
1232
+ return parentLink?.isInviting === true;
1233
+ }
1228
1234
  }
1229
1235
 
1230
1236
  /**
@@ -1309,8 +1315,15 @@ export class User extends BaseEntity<UserItemNormalized> {
1309
1315
  } catch{
1310
1316
  return false;
1311
1317
  }
1312
- const parentLink = this._getParentLinkForUser();
1313
- return parentLink?.toBeValidated === true;
1318
+ if(this.getEntityType() === "citoyens"){
1319
+ const userLink = this._getLinkFromConnectedUser();
1320
+ if (!userLink) return false;
1321
+ return userLink?.toBeValidated === true;
1322
+ } else {
1323
+ const parentLink = this._getParentLinkForUser();
1324
+ if (!parentLink) return false;
1325
+ return parentLink?.toBeValidated === true;
1326
+ }
1314
1327
  }
1315
1328
 
1316
1329
  /**