invite post to use application/JSON
changed to .ajax from .post to allow content type to be set
This commit is contained in:
parent
8ea693616d
commit
76638f524d
|
@ -275,15 +275,20 @@ export function invitePeopleAndChatRooms( // eslint-disable-line max-params
|
|||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
$.post(
|
||||
`${inviteServiceUrl}?token=${jwt}`,
|
||||
JSON.stringify({
|
||||
'invited': inviteItems,
|
||||
'url': inviteUrl
|
||||
}),
|
||||
resolve,
|
||||
'json')
|
||||
.fail((jqxhr, textStatus, error) => reject(error));
|
||||
$.ajax({
|
||||
url: `${inviteServiceUrl}?token=${jwt}`,
|
||||
data: JSON.stringify({
|
||||
'invited': inviteItems,
|
||||
'url': inviteUrl
|
||||
}),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json', // send as JSON
|
||||
success: resolve, // called when success is reached
|
||||
// called when there is an error
|
||||
error: (jqxhr, textStatus, error) => {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue