diff options
| author | realtradam <[email protected]> | 2024-06-29 18:30:20 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2024-06-29 18:30:20 -0400 |
| commit | 2a8545f11267de06447b3c56d8beca8d27596dab (patch) | |
| tree | e9e4aaf0ed2436d3ca31114c739194dd351e8d09 /rails-backend | |
| parent | 95088f3fdd3f593d486b55e3840cee0dbc1a5051 (diff) | |
| download | gameHolster-dev.tar.gz gameHolster-dev.zip | |
work on rendering gamesdev
Diffstat (limited to 'rails-backend')
| -rw-r--r-- | rails-backend/app/controllers/api/v1/games_controller.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rails-backend/app/controllers/api/v1/games_controller.rb b/rails-backend/app/controllers/api/v1/games_controller.rb index 4346244..2d5e98a 100644 --- a/rails-backend/app/controllers/api/v1/games_controller.rb +++ b/rails-backend/app/controllers/api/v1/games_controller.rb @@ -39,8 +39,7 @@ class Api::V1::GamesController < ApplicationController # list of all games def index game = Game.all.order(created_at: :desc) - #render json: game - render json: game.to_json(include: [:game_files, :card_img, :char_img, :title_img, :tags]) + render json: game.to_json(include: [tags: { only: [:tag_type, :name] }, user: { only: [:user_name, :id] }], except: [:user_id]) end # single game or list of user's games |
