log when archiving content via the admin panel

pull/1/head
ansuz 4 years ago
parent 860b5a33cb
commit d0df2f5840

@ -160,9 +160,19 @@ var archiveDocument = function (Env, Server, cb, data) {
switch (id.length) {
case 32:
// TODO disconnect users from active sessions
return void Env.msgStore.archiveChannel(id, cb);
return void Env.msgStore.archiveChannel(id, Util.both(cb, function (err) {
Env.Log.info("ARCHIVAL_CHANNEL_BY_ADMIN_RPC", {
channelId: id,
status: err? String(err): "SUCCESS",
});
}));
case 48:
return void Env.blobStore.archive.blob(id, cb);
return void Env.blobStore.archive.blob(id, Util.both(cb, function (err) {
Env.Log.info("ARCHIVAL_BLOB_BY_ADMIN_RPC", {
id: id,
status: err? String(err): "SUCCESS",
});
}));
default:
return void cb("INVALID_ID_LENGTH");
}

Loading…
Cancel
Save