app/controllers/phcpresspro/api/v1/posts_controller.rb in phcpresspro-25.0.0 vs app/controllers/phcpresspro/api/v1/posts_controller.rb in phcpresspro-27.0.0

- old
+ new

@@ -6,15 +6,15 @@ # Only Responds to API Requests respond_to :json # Article Category API def index - @article_posts = Article::Post.where(pststatus: 'published').order('created_at ASC') + @article_posts = Article::Post.where(org_id: current_user.org_id, pststatus: 'published').order('created_at ASC') end # Article Show def show - @article_post = Article::Post.where(pststatus: 'published').find(params[:id]) + @article_post = Article::Post.where(org_id: current_user.org_id, pststatus: 'published').find(params[:id]) end end end