From 730d015435e85128a7466dcc445629133f792f12 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Mon, 18 Apr 2016 09:30:19 +0200 Subject: [PATCH] remove spaces --- src/restapi.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/restapi.js b/src/restapi.js index bffba67..ec48d41 100644 --- a/src/restapi.js +++ b/src/restapi.js @@ -10,10 +10,10 @@ const queue = []; export function get (url) { return new Promise((resolve, reject) => { $.ajax({ - url: url, - dataType: 'json', - timeout: GET_TIMEOUT, + url: url, type: 'GET', + dataType: 'json', + timeout: GET_TIMEOUT, success: (response) => { if (response.status === 'success') { resolve(response.data, response.msg); @@ -29,11 +29,11 @@ export function get (url) { export function post (url, data) { return new Promise((resolve, reject) => { $.ajax({ - url: url, - type: 'POST', - data: data, - dataType: 'json', - timeout: POST_TIMEOUT, + url: url, + type: 'POST', + data: data, + dataType: 'json', + timeout: POST_TIMEOUT, success: (response) => { if (response.status === 'success') { resolve(response.data); @@ -76,8 +76,8 @@ export function post (url, data) { return new Promise((resolve, reject) => { fetch(url, { - method: 'post', - enctype: 'x-www-form-urlencoded', + method: 'post', + enctype: 'x-www-form-urlencoded', headers: { 'Accept': 'application/json' }, @@ -98,4 +98,4 @@ export function post (url, data) { }).catch(reject); }); } -*/ \ No newline at end of file +*/