diff options
| author | realtradam <[email protected]> | 2024-06-27 12:41:26 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2024-06-27 12:41:26 -0400 |
| commit | c8be5658bae95b94198dc00bd206ba324d9404e0 (patch) | |
| tree | 24563828d9f04a4e52c9187cff3c028434fd886c /rails-backend/app/controllers/api/v1/users_controller.rb | |
| parent | 8ec0664fe7cf4a34bc5fc1f162c053622a42dd41 (diff) | |
| download | gameHolster-c8be5658bae95b94198dc00bd206ba324d9404e0.tar.gz gameHolster-c8be5658bae95b94198dc00bd206ba324d9404e0.zip | |
add frontend to repo
Diffstat (limited to 'rails-backend/app/controllers/api/v1/users_controller.rb')
| -rw-r--r-- | rails-backend/app/controllers/api/v1/users_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rails-backend/app/controllers/api/v1/users_controller.rb b/rails-backend/app/controllers/api/v1/users_controller.rb new file mode 100644 index 0000000..ad27ad6 --- /dev/null +++ b/rails-backend/app/controllers/api/v1/users_controller.rb @@ -0,0 +1,10 @@ +class Api::V1::UsersController < ApplicationController + def index + # return list of all users + users = User.all.order(created_at: :desc) + #render json: users.to_json(only: [:name]) + #render json: users.to_json(only: [:user]) + #render json: users.to_json(only: { only: [:name] }) + render json: users.to_json(include: [games: { only: [:title, :titleSlug] }]) + end +end |
