Skip to content

Commit

Permalink
chore: not ignore l5api eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
timcui committed May 28, 2018
1 parent 5e307be commit 7c776da
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 71 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
bin/wwwroot/**/highlight-tsw.js
bin/wwwroot/**/zepto.min.js
bin/lib/api/L5/L5.api.js
138 changes: 68 additions & 70 deletions bin/lib/api/L5/L5.api.js
Original file line number Diff line number Diff line change
@@ -1,70 +1,68 @@
/*!
* Tencent is pleased to support the open source community by making Tencent Server Web available.
* Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
"use strict";

const logger = require('logger');
const Deferred = require('util/Deferred');
const config = require('config');

//获取路由
this.ApiGetRoute = function(options,callback){

var defer = Deferred.create();
var res = this.ApiGetRouteSync(options) || {};

if (typeof callback === 'function') {
callback(res);
}

if (res.ret >= 0) {
defer.resolve(res);
} else {
defer.reject(res);
}

return defer;
}

//上报结果
this.ApiRouteResultUpdate = function(options){

var defer = Deferred.create();
var res = this.ApiRouteResultUpdateSync(options);

if(res.ret >= 0){
defer.resolve(res);
}else{
defer.reject(res);
}

return defer;
}

//获取路由
this.ApiGetRouteSync = function(options){

var res = {
ret: -1
};

return res;
};

//上报结果
this.ApiRouteResultUpdateSync = function(options){

var res = {
ret: -1
};

return res;
}

//多一组方法
this.updateRoute = this.ApiRouteResultUpdateSync;
this.getRouteAsync = this.ApiGetRoute;
/* !
* Tencent is pleased to support the open source community by making Tencent Server Web available.
* Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
'use strict';

const Deferred = require('util/Deferred');

// 获取路由
this.ApiGetRoute = function(options, callback) {

const defer = Deferred.create();
const res = this.ApiGetRouteSync(options) || {};

if (typeof callback === 'function') {
callback(res);
}

if (res.ret >= 0) {
defer.resolve(res);
} else {
defer.reject(res);
}

return defer;
};

// 上报结果
this.ApiRouteResultUpdate = function(options) {

const defer = Deferred.create();
const res = this.ApiRouteResultUpdateSync(options);

if (res.ret >= 0) {
defer.resolve(res);
} else {
defer.reject(res);
}

return defer;
};

// 获取路由
this.ApiGetRouteSync = function(options) {

const res = {
ret: -1
};

return res;
};

// 上报结果
this.ApiRouteResultUpdateSync = function(options) {

const res = {
ret: -1
};

return res;
};

// 多一组方法
this.updateRoute = this.ApiRouteResultUpdateSync;
this.getRouteAsync = this.ApiGetRoute;

0 comments on commit 7c776da

Please sign in to comment.