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) => {
|
return new Promise((resolve, reject) => {
|
||||||
$.post(
|
$.ajax({
|
||||||
`${inviteServiceUrl}?token=${jwt}`,
|
url: `${inviteServiceUrl}?token=${jwt}`,
|
||||||
JSON.stringify({
|
data: JSON.stringify({
|
||||||
'invited': inviteItems,
|
'invited': inviteItems,
|
||||||
'url': inviteUrl
|
'url': inviteUrl
|
||||||
}),
|
}),
|
||||||
resolve,
|
dataType: 'json',
|
||||||
'json')
|
contentType: 'application/json', // send as JSON
|
||||||
.fail((jqxhr, textStatus, error) => reject(error));
|
success: resolve, // called when success is reached
|
||||||
|
// called when there is an error
|
||||||
|
error: (jqxhr, textStatus, error) => {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue