Skip to content

Commit

Permalink
Update specs
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Oct 16, 2024
1 parent 3e9a234 commit b484700
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
10 changes: 4 additions & 6 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1734,13 +1734,11 @@ https://docs.crisp.chat/references/rest-api/v1/#invite-a-website-operator

var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";

var verify = {
"email": "[email protected]",
"role": "member",
"verify": "MySuperSecurePassword"
};
var email = "[email protected]";
var role = "member";
var token = "451930";

CrispClient.website.inviteWebsiteOperator(websiteID, email, role, verify);
CrispClient.website.inviteWebsiteOperator(websiteID, email, role, token);

=========================

Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2495,20 +2495,18 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
</details>

* **Invite A Website Operator** [`user`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#invite-a-website-operator)
* `CrispClient.website.inviteWebsiteOperator(websiteID, email, role, verify)`
* `CrispClient.website.inviteWebsiteOperator(websiteID, email, role, token)`
* <details>
<summary>See Example</summary>

```javascript
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
var verify = {
"email": "[email protected]",
"role": "member",
"verify": "MySuperSecurePassword"
};
var email = "[email protected]";
var role = "member";
var token = "451930";
CrispClient.website.inviteWebsiteOperator(websiteID, email, role, verify);
CrispClient.website.inviteWebsiteOperator(websiteID, email, role, token);
```
</details>

Expand Down
10 changes: 5 additions & 5 deletions lib/resources/WebsiteOperator.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,19 @@ function WebsiteOperator(service, crisp) {
* @param {string} websiteID
* @param {string} email
* @param {string} role
* @param {string} verify
* @param {string} token
* @return {Promise}
*/
service.inviteWebsiteOperator = function(websiteID, email, role, verify) {
service.inviteWebsiteOperator = function(websiteID, email, role, token) {
return crisp.post(
crisp._prepareRestUrl(["website", websiteID, "operator"]),

null,

{
email : email,
role : role,
verify : verify
email : email,
role : role,
token : token
}
);
};
Expand Down

0 comments on commit b484700

Please sign in to comment.