0
0
mirror of https://github.com/Doodle3D/Doodle3D-API synced 2024-12-22 13:53:48 +01:00

remove spaces

This commit is contained in:
casperlamboo 2016-04-18 09:30:19 +02:00
parent 2445a742b7
commit 730d015435

View File

@ -10,10 +10,10 @@ const queue = [];
export function get (url) { export function get (url) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
$.ajax({ $.ajax({
url: url, url: url,
dataType: 'json',
timeout: GET_TIMEOUT,
type: 'GET', type: 'GET',
dataType: 'json',
timeout: GET_TIMEOUT,
success: (response) => { success: (response) => {
if (response.status === 'success') { if (response.status === 'success') {
resolve(response.data, response.msg); resolve(response.data, response.msg);
@ -29,11 +29,11 @@ export function get (url) {
export function post (url, data) { export function post (url, data) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
$.ajax({ $.ajax({
url: url, url: url,
type: 'POST', type: 'POST',
data: data, data: data,
dataType: 'json', dataType: 'json',
timeout: POST_TIMEOUT, timeout: POST_TIMEOUT,
success: (response) => { success: (response) => {
if (response.status === 'success') { if (response.status === 'success') {
resolve(response.data); resolve(response.data);
@ -76,8 +76,8 @@ export function post (url, data) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
fetch(url, { fetch(url, {
method: 'post', method: 'post',
enctype: 'x-www-form-urlencoded', enctype: 'x-www-form-urlencoded',
headers: { headers: {
'Accept': 'application/json' 'Accept': 'application/json'
}, },
@ -98,4 +98,4 @@ export function post (url, data) {
}).catch(reject); }).catch(reject);
}); });
} }
*/ */