feat: Record share link last accessed time (#2047)

* chore: Migrations

* chore: Add recording of share link views

* feat: Add display of share link accessed date in admin

* translations

* test

* translations, admin pagination
This commit is contained in:
Tom Moor
2021-04-18 09:38:13 -07:00
committed by GitHub
parent e9f083feb8
commit 7f9cba9819
11 changed files with 80 additions and 36 deletions

View File

@@ -518,6 +518,8 @@ async function loadDocument({ id, shareId, user }) {
if (!team.sharing) {
throw new AuthorizationError();
}
await share.update({ lastAccessedAt: new Date() });
} else {
document = await Document.findByPk(id, {
userId: user ? user.id : undefined,