mirror of https://gitee.com/bigwinds/arangodb
Linting.
This commit is contained in:
parent
6e9900c462
commit
273d16c0ed
|
@ -2,11 +2,14 @@
|
|||
"bitwise": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"esnext": true,
|
||||
"forin": true,
|
||||
"freeze": true,
|
||||
"globalstrict": true,
|
||||
"immed": true,
|
||||
"indent": 2,
|
||||
"laxbreak": true,
|
||||
"maxlen": 120,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"node": true,
|
||||
|
@ -15,7 +18,5 @@
|
|||
"nonew": true,
|
||||
"strict": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"indent": 2,
|
||||
"maxlen": 120
|
||||
"unused": true
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/*global applicationContext */
|
||||
'use strict';
|
||||
|
||||
const _ = require('underscore');
|
||||
const joi = require('joi');
|
||||
const internal = require('internal');
|
||||
|
|
|
@ -1399,7 +1399,7 @@ function require (path) {
|
|||
try {
|
||||
fn = internal.executeScript("(" + script + ")", undefined, filename);
|
||||
} catch (e) {
|
||||
// This should never happen, right?
|
||||
require('console').errorLines(e);
|
||||
throw extend(new internal.ArangoError({
|
||||
errorNum: internal.errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.code,
|
||||
errorMessage: internal.errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.message
|
||||
|
@ -1416,6 +1416,7 @@ function require (path) {
|
|||
return args[key];
|
||||
}));
|
||||
} catch (e) {
|
||||
require('console').errorLines(e);
|
||||
throw extend(new internal.ArangoError({
|
||||
errorNum: internal.errors.ERROR_MODULE_FAILURE.code,
|
||||
errorMessage: internal.errors.ERROR_MODULE_FAILURE.message
|
||||
|
|
|
@ -50,10 +50,10 @@ function decorateController(auth, controller) {
|
|||
secret: cfg.cookie.secret,
|
||||
algorithm: cfg.cookie.algorithm
|
||||
}
|
||||
});
|
||||
} : undefined);
|
||||
}
|
||||
if (cfg.header) {
|
||||
sid = sid || req.headers[cfg.header.toLowerCase()];
|
||||
if (!sid && cfg.header) {
|
||||
sid = req.headers[cfg.header.toLowerCase()];
|
||||
}
|
||||
if (sid) {
|
||||
if (cfg.jwt) {
|
||||
|
|
Loading…
Reference in New Issue