From 3f41a26afdf95498790390dd9f34655c46f72388 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Sun, 28 May 2023 10:54:32 -0600 Subject: Añade dominio de app en políticas cors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/cards_controller.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/controllers/api') 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) -- cgit v1.2.3