From d0db63c3b01cd81cb02b1c0496ef80c30eaff641 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 23 Jan 2017 17:57:16 +0200 Subject: [PATCH] chore(rest) rm " " --- client/rest.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/client/rest.js b/client/rest.js index 37a9dea2..af397d0f 100644 --- a/client/rest.js +++ b/client/rest.js @@ -66,28 +66,28 @@ var Util, DOM, CloudFunc, CloudCmd; }); }; - this.read = function(url, dataType, callback) { - var isQuery = /\?/.test(url), - isBeautify = /\?beautify$/.test(url), - isMinify = /\?minify$/.test(url), - notLog = !isQuery || isBeautify || isMinify, - isFunc = itype.function(dataType); + this.read = function(url, dataType, callback) { + var isQuery = /\?/.test(url); + var isBeautify = /\?beautify$/.test(url); + var isMinify = /\?minify$/.test(url); + var notLog = !isQuery || isBeautify || isMinify; + var isFunc = itype.function(dataType); if (!callback && isFunc) { - callback = dataType; - dataType = 'text'; + callback = dataType; + dataType = 'text'; } sendRequest({ - method : 'GET', - url : CloudFunc.FS + url, - callback : callback, - notLog : notLog, - dataType : dataType + method: 'GET', + url: CloudFunc.FS + url, + callback: callback, + notLog: notLog, + dataType: dataType }); }; - this.cp = function(data, callback) { + this.cp = function(data, callback) { sendRequest({ method : 'PUT', url : '/cp',