Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nicolas Frandeboeuf
kresus
Commits
77361825
Commit
77361825
authored
Apr 24, 2017
by
ZeHiro
Committed by
ZeHiro
Apr 26, 2017
Browse files
Fix callback-return lint rule
parent
5b677aec
Changes
7
Hide whitespace changes
Inline
Side-by-side
.eslintrc.yml
View file @
77361825
...
...
@@ -250,7 +250,7 @@
# Node.js and CommonJS
#######################################################################
callback-return
:
-
0
# TODO?
-
2
global-require
:
-
0
handle-callback-err
:
...
...
server/controllers/accesses.js
View file @
77361825
...
...
@@ -16,7 +16,7 @@ export async function preloadAccess(req, res, next, accessId) {
throw
new
KError
(
'
bank access not found
'
,
404
);
}
req
.
preloaded
=
{
access
};
next
();
return
next
();
}
catch
(
err
)
{
return
asyncErr
(
res
,
err
,
'
when finding bank access
'
);
}
...
...
server/controllers/accounts.js
View file @
77361825
...
...
@@ -17,7 +17,7 @@ export async function preloadAccount(req, res, next, accountID) {
throw
new
KError
(
'
Bank account not found
'
,
404
);
}
req
.
preloaded
=
{
account
};
next
();
return
next
();
}
catch
(
err
)
{
return
asyncErr
(
res
,
err
,
'
when preloading a bank account
'
);
}
...
...
server/controllers/alerts.js
View file @
77361825
...
...
@@ -11,7 +11,7 @@ export async function loadAlert(req, res, next, alertId) {
}
req
.
preloaded
=
req
.
preloaded
||
{};
req
.
preloaded
.
alert
=
alert
;
next
();
return
next
();
}
catch
(
err
)
{
return
asyncErr
(
res
,
err
,
'
when preloading alert
'
);
}
...
...
server/controllers/categories.js
View file @
77361825
...
...
@@ -37,7 +37,7 @@ export async function preloadCategory(req, res, next, id) {
throw
new
KError
(
'
Category not found
'
,
404
);
req
.
preloaded
=
{
category
};
next
();
return
next
();
}
catch
(
err
)
{
return
asyncErr
(
res
,
err
,
'
when preloading a category
'
);
}
...
...
server/controllers/operations.js
View file @
77361825
...
...
@@ -15,7 +15,7 @@ async function preload(varName, req, res, next, operationID) {
}
req
.
preloaded
=
req
.
preloaded
||
{};
req
.
preloaded
[
varName
]
=
operation
;
next
();
return
next
();
}
catch
(
err
)
{
return
asyncErr
(
res
,
err
,
'
when preloading an operation
'
);
}
...
...
server/init.js
View file @
77361825
...
...
@@ -32,5 +32,5 @@ ${err.stack}`);
}
if
(
callback
)
callback
(
app
,
server
);
return
callback
(
app
,
server
);
};
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment