diff --git a/src/core/Repository.ts b/src/core/Repository.ts index cee91dd..8be3822 100644 --- a/src/core/Repository.ts +++ b/src/core/Repository.ts @@ -397,7 +397,13 @@ export default class Repository { this._model.lastView = new Date(); this._model.pageView = (this._model.pageView || 0) + 1; if (!isConnected) return this.model; - await this._model.save(); + await AnonymizedRepositoryModel.updateOne( + { _id: this._model._id }, + { + $set: { lastView: this._model.lastView }, + $inc: { pageView: 1 }, + } + ).exec(); } /**