diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/cards_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/api/cards_controller.rb b/app/controllers/api/cards_controller.rb index f9f977b..58110c6 100644 --- a/app/controllers/api/cards_controller.rb +++ b/app/controllers/api/cards_controller.rb @@ -9,6 +9,16 @@ module Api render json: serialized_collection.serializable_hash, status: :ok end + + def show + @card = current_user_account.cards.find_by(id: params[:id]) + + if @card + render json: serialized_object.serializable_hash, status: :ok + else + render status: :not_found + end + end def create @card = current_user_account.cards.new(permitted_params) |