Add simple count of views to share links (#4036)
* Add simple count of views to share links * Remove no longer applicable tests * Avoid incrementing view count for known bots
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
Table,
|
||||
Scopes,
|
||||
DataType,
|
||||
Default,
|
||||
} from "sequelize-typescript";
|
||||
import Collection from "./Collection";
|
||||
import Document from "./Document";
|
||||
@@ -79,6 +80,11 @@ class Share extends IdModel {
|
||||
@Column
|
||||
lastAccessedAt: Date | null;
|
||||
|
||||
/** Total count of times the shared link has been accessed */
|
||||
@Default(0)
|
||||
@Column
|
||||
views: number;
|
||||
|
||||
// getters
|
||||
|
||||
get isRevoked() {
|
||||
|
||||
Reference in New Issue
Block a user