0
0
mirror of https://github.com/Doodle3D/Doodle3D-API synced 2024-11-05 04:33:24 +01:00
This commit is contained in:
casperlamboo 2016-04-20 11:12:06 +02:00
parent 7d9d3ad8ac
commit a2bf6257ce

View File

@ -10,17 +10,17 @@ let sending = false;
export function get (url) {
return new Promise((resolve, reject) => {
addQue({ url, type: 'GET', resolve, reject });
addQueue({ url, type: 'GET', resolve, reject });
});
}
export function post (url, data) {
return new Promise((resolve, reject) => {
addQue({ url, type: 'POST', data, resolve, reject });
addQueue({ url, type: 'POST', data, resolve, reject });
});
}
function addQue(ajaxData) {
function addQueue(ajaxData) {
if (sending) {
sendQueue(ajaxData);
} else {