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 Promise.resolve();
} }
return new Promise((resolve, reject) => { return fetch(
$.post( `${inviteServiceUrl}?token=${jwt}`,
`${inviteServiceUrl}?token=${jwt}`, {
JSON.stringify({ body: JSON.stringify({
'invited': inviteItems, 'invited': inviteItems,
'url': inviteUrl 'url': inviteUrl
}), }),
resolve, method: 'POST',
'json') headers: {
.fail((jqxhr, textStatus, error) => reject(error)); 'Content-Type': 'application/json'
}); }
}
);
} }
/** /**