fix : Help Center article view count (#6429)
* fix: resolves issue with non updating article view count Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com> * Update articles_controller.rb --------- Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com> Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
@@ -16,6 +16,8 @@ class Public::Api::V1::Portals::ArticlesController < PublicController
|
||||
|
||||
def set_article
|
||||
@article = @category.articles.find(params[:id])
|
||||
@article.views = @article.views ? @article.views + 1 : 1
|
||||
@article.save
|
||||
@parsed_content = render_article_content(@article.content)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user