mirror of https://github.com/calzoneman/sync.git
Update acp.js to be compatible with new actionlog
This commit is contained in:
parent
b342be50a3
commit
e7b22997c7
9
acp.js
9
acp.js
|
@ -10,10 +10,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||
*/
|
||||
|
||||
var Auth = require("./auth");
|
||||
var ActionLog = require("./actionlog");
|
||||
|
||||
module.exports = function (Server) {
|
||||
var db = Server.db;
|
||||
var ActionLog = require("./actionlog")(Server);
|
||||
return {
|
||||
init: function(user) {
|
||||
ActionLog.record(user.ip, user.name, "acp-init");
|
||||
|
@ -143,9 +143,10 @@ module.exports = function (Server) {
|
|||
});
|
||||
|
||||
user.socket.on("acp-actionlog-list", function () {
|
||||
user.socket.emit("acp-actionlog-list",
|
||||
ActionLog.getLogTypes()
|
||||
);
|
||||
ActionLog.listActionTypes(function (err, types) {
|
||||
if(!err)
|
||||
user.socket.emit("acp-actionlog-list", types);
|
||||
});
|
||||
});
|
||||
|
||||
user.socket.on("acp-actionlog-clear", function(data) {
|
||||
|
|
Loading…
Reference in New Issue