rename event

This commit is contained in:
Jonathan Rainville 2018-09-07 10:56:07 -04:00 committed by Pascal Precht
parent 8a4e1063a7
commit ae3185d96f
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class Authenticator {
(`http://${host}:${port}/embark?token=${this.authToken}`.underline)));
});
this.events.setCommandHandler('api:authorize', (token, cb) => {
this.events.setCommandHandler('authenticator:authorize', (token, cb) => {
if (token !== this.authToken) {
return cb(ERROR_OBJ);
}

View File

@ -167,7 +167,7 @@ class Server {
}
applyAPIFunction (cb, req, res) {
this.events.request('api:authorize', req.headers.authorization, (err) => {
this.events.request('authenticator:authorize', req.headers.authorization, (err) => {
if (err) {
const send = res.send ? res.send.bind(res) : req.send.bind(req); // WS only has the first params
return send(err);