|
|
|
@ -343,9 +343,9 @@ class PostController extends SiteController {
|
|
|
|
|
throw new SiteError(403, 'The post is not published');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await resourceService.recordView(req, 'Post', res.locals.post._id);
|
|
|
|
|
|
|
|
|
|
if (res.locals.post.status === 'published') {
|
|
|
|
|
await resourceService.recordView(req, 'Post', res.locals.post._id);
|
|
|
|
|
}
|
|
|
|
|
res.locals.countPerPage = 20;
|
|
|
|
|
res.locals.pagination = this.getPaginationParameters(req, res.locals.countPerPage);
|
|
|
|
|
|
|
|
|
|