remove blockcing if
This commit is contained in:
parent
31476cf2b8
commit
328d9c7c07
|
@ -164,9 +164,6 @@ class Server {
|
|||
|
||||
applyAPIFunction (cb, req, res) {
|
||||
const authToken = (!res.send) ? req.protocol : req.headers.authorization;
|
||||
if (!res.send) {
|
||||
return cb(req, res);
|
||||
}
|
||||
this.events.request('authenticator:authorize', authToken, (err) => {
|
||||
if (err) {
|
||||
const send = res.send ? res.send.bind(res) : req.send.bind(req); // WS only has the first params
|
||||
|
|
Loading…
Reference in New Issue