Sha256: e6450ed7aa04d431b2322d6139ce04a96741198b83d0bdf32672339446582074

Contents?: true

Size: 526 Bytes

Versions: 13

Compression:

Stored size: 526 Bytes

Contents

require_dependency "phcpresspro/application_controller"

module Phcpresspro
  class Api::V1::PostsController < ApplicationController

    # Only Responds to API Requests
    respond_to :json

    # Article Category API
    def index
      @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(org_id: current_user.org_id, pststatus: 'published').find(params[:id])
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
phcpresspro-34.0.0 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-33.0.2 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-33.0.1 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-33.0.0 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-32.0.1 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-32.0.0 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-31.1.0 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-31.0.0 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-30.0.0 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-29.0.1 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-29.0.0 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-28.0.0 app/controllers/phcpresspro/api/v1/posts_controller.rb
phcpresspro-27.0.0 app/controllers/phcpresspro/api/v1/posts_controller.rb