|
@ -30,7 +30,7 @@ class ResourceService extends SiteService { |
|
|
* current Date, and upserting a tracking object in MongoDB. |
|
|
* current Date, and upserting a tracking object in MongoDB. |
|
|
* |
|
|
* |
|
|
* @param {Request} req |
|
|
* @param {Request} req |
|
|
* @param {String} resourceType 'Post', 'Page', or 'Newsletter' |
|
|
* @param {String} resourceType 'Link', 'User', or 'Newsletter' |
|
|
* @param {mongoose.Types.ObjectId} resourceId The _id of the object for which |
|
|
* @param {mongoose.Types.ObjectId} resourceId The _id of the object for which |
|
|
* a view is being tracked. |
|
|
* a view is being tracked. |
|
|
*/ |
|
|
*/ |
|
@ -61,7 +61,7 @@ class ResourceService extends SiteService { |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
if (response.upsertedCount > 0) { |
|
|
if (response.upsertedCount > 0) { |
|
|
modelUpdate.$inc['stats.uniqueViewCount'] = 1; |
|
|
modelUpdate.$inc['stats.uniqueVisitCount'] = 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|