use fetch syntax from virtuacoplenny
This commit is contained in:
parent
76638f524d
commit
1a5e2763c1
|
@ -274,22 +274,19 @@ export function invitePeopleAndChatRooms( // eslint-disable-line max-params
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return fetch(
|
||||||
$.ajax({
|
`${inviteServiceUrl}?token=${jwt}`,
|
||||||
url: `${inviteServiceUrl}?token=${jwt}`,
|
{
|
||||||
data: JSON.stringify({
|
body: JSON.stringify({
|
||||||
'invited': inviteItems,
|
'invited': inviteItems,
|
||||||
'url': inviteUrl
|
'url': inviteUrl
|
||||||
}),
|
}),
|
||||||
dataType: 'json',
|
method: 'POST',
|
||||||
contentType: 'application/json', // send as JSON
|
headers: {
|
||||||
success: resolve, // called when success is reached
|
'Content-Type': 'application/json'
|
||||||
// called when there is an error
|
}
|
||||||
error: (jqxhr, textStatus, error) => {
|
}
|
||||||
reject(error);
|
);
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue