summaryrefslogtreecommitdiff
path: root/app/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/cards_controller.rb10
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)