Merge pull request #3886 from jitsi/invitation-post-application-json

invite post to use application/JSON
This commit is contained in:
Aaron van Meerten 2019-02-13 16:42:47 -06:00 committed by GitHub
commit e144c2fb3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 11 deletions

View File

@ -274,17 +274,19 @@ export function invitePeopleAndChatRooms( // eslint-disable-line max-params
return Promise.resolve();
}
return new Promise((resolve, reject) => {
$.post(
`${inviteServiceUrl}?token=${jwt}`,
JSON.stringify({
'invited': inviteItems,
'url': inviteUrl
}),
resolve,
'json')
.fail((jqxhr, textStatus, error) => reject(error));
});
return fetch(
`${inviteServiceUrl}?token=${jwt}`,
{
body: JSON.stringify({
'invited': inviteItems,
'url': inviteUrl
}),
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
}
);
}
/**