Merge pull request #5575 from overleaf/bg-improve-undelete-doc-admin-page

add deletedAt timestamp to undelete doc admin page

GitOrigin-RevId: 46893aae35290e42886320731a5f68811fb3ed46
This commit is contained in:
Brian Gough
2021-10-27 08:03:29 +00:00
committed by Copybot
parent e681c6322f
commit 4688cb7b54
2 changed files with 49 additions and 11 deletions
+6 -2
View File
@@ -117,14 +117,18 @@ module.exports = HttpController = {
logger.log({ project_id }, 'getting all deleted docs')
DocManager.getAllDeletedDocs(
project_id,
{ name: true },
{ name: true, deletedAt: true },
function (error, docs) {
if (error) {
return next(error)
}
res.json(
docs.map(doc => {
return { _id: doc._id.toString(), name: doc.name }
return {
_id: doc._id.toString(),
name: doc.name,
deletedAt: doc.deletedAt,
}
})
)
}