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) { export function get (url) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
addQue({ url, type: 'GET', resolve, reject }); addQueue({ url, type: 'GET', resolve, reject });
}); });
} }
export function post (url, data) { export function post (url, data) {
return new Promise((resolve, reject) => { 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) { if (sending) {
sendQueue(ajaxData); sendQueue(ajaxData);
} else { } else {