Skip to content

Commit 919ff7e

Browse files
committed
Created logout method
1 parent 2a04411 commit 919ff7e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/zabbix.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,13 @@ Client.prototype.login = function login(callback) {
106106
);
107107
};
108108

109+
//Version 2.4 uses the method user.logout
110+
Client.prototype.logout = function login(callback) {
111+
this.rpcid = 0; // Reset this, why not?
112+
this.call('user.logout', {}, function (error, response, body) {
113+
callback(error, response, body);
114+
}.bind(this)
115+
);
116+
};
109117

110118
module.exports = Client;

0 commit comments

Comments
 (0)