diff options
author | HombreLaser <sebastian-440@live.com> | 2023-05-28 10:54:32 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-05-28 10:54:32 -0600 |
commit | 3f41a26afdf95498790390dd9f34655c46f72388 (patch) | |
tree | 483e1b7a263acd3d89b6927d70d51898748becd4 /app | |
parent | 9a5e4d0b957cfb10acce8f1becd1bd6bd4fd9005 (diff) |
Diffstat (limited to 'app')
-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) |