Sha256: 420f2209b6919168f7eea70d73847cbff5c0abd8291336162cb2650c4af52e7a

Contents?: true

Size: 467 Bytes

Versions: 1

Compression:

Stored size: 467 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(pststatus: 'published').order('created_at ASC')
    end

    # Article Show
    def show
      @article_post = Article::Post.where(poststatus: published).find(params[:id])
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
phcpresspro-22.2.0 app/controllers/phcpresspro/api/v1/posts_controller.rb