@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/dist/cocolight-api-client.browser.js +1 -1
- package/dist/cocolight-api-client.cjs +1 -1
- package/dist/cocolight-api-client.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
- package/package.json +1 -1
- package/src/api/User.ts +18 -5
package/package.json
CHANGED
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
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
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
|
-
|
|
1313
|
-
|
|
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
|
/**
|