feat: History page - List previous commits

This commit is contained in:
NGPixel
2017-04-30 16:37:10 -04:00
parent a7c4f42ef0
commit a748b3a4eb
10 changed files with 132 additions and 6 deletions

View File

@@ -402,5 +402,17 @@ module.exports = {
return rights.checkRole('/' + r._id, usr.rights, 'read')
})
})
},
getHistory (entryPath) {
return db.Entry.findOne({ _id: entryPath, isEntry: true }).then(entry => {
if (!entry) { return false }
return git.getHistory(entryPath).then(history => {
return {
meta: entry,
history
}
})
})
}
}