From 4c7f7e271e9f112ab83948e440537d1aac3c40fc Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 11 Dec 2020 17:57:42 +0530 Subject: [PATCH] remove an XXX note, log when restoring docs by admin rpc --- lib/commands/admin-rpc.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/commands/admin-rpc.js b/lib/commands/admin-rpc.js index 8d2f172df..595b4c6dc 100644 --- a/lib/commands/admin-rpc.js +++ b/lib/commands/admin-rpc.js @@ -188,10 +188,21 @@ var restoreArchivedDocument = function (Env, Server, cb, data) { switch (id.length) { case 32: - return void Env.msgStore.restoreArchivedChannel(id, cb); + return void Env.msgStore.restoreArchivedChannel(id, Util.both(cb, function (err) { + Env.Log.info("RESTORATION_CHANNEL_BY_ADMIN_RPC", { + id: id, + status: err? String(err): 'SUCCESS', + }); + })); case 48: - // Env.blobStore.restore.proof(userSafekey, id, cb) // XXX .... - return void Env.blobStore.restore.blob(id, cb); + // FIXME this does not yet restore blob ownership + // Env.blobStore.restore.proof(userSafekey, id, cb) + return void Env.blobStore.restore.blob(id, Util.both(cb, function (err) { + Env.Log.info("RESTORATION_BLOB_BY_ADMIN_RPC", { + id: id, + status: err? String(err): 'SUCCESS', + }); + })); default: return void cb("INVALID_ID_LENGTH"); }