|
|
@ -188,10 +188,21 @@ var restoreArchivedDocument = function (Env, Server, cb, data) {
|
|
|
|
|
|
|
|
|
|
|
|
switch (id.length) {
|
|
|
|
switch (id.length) {
|
|
|
|
case 32:
|
|
|
|
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:
|
|
|
|
case 48:
|
|
|
|
// Env.blobStore.restore.proof(userSafekey, id, cb) // XXX ....
|
|
|
|
// FIXME this does not yet restore blob ownership
|
|
|
|
return void Env.blobStore.restore.blob(id, cb);
|
|
|
|
// 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:
|
|
|
|
default:
|
|
|
|
return void cb("INVALID_ID_LENGTH");
|
|
|
|
return void cb("INVALID_ID_LENGTH");
|
|
|
|
}
|
|
|
|
}
|
|
|
|