diff --git a/app/controllers/api/v1/teams_controller.rb b/app/controllers/api/v1/teams_controller.rb index 53e6e0c0c..40c4eefb0 100644 --- a/app/controllers/api/v1/teams_controller.rb +++ b/app/controllers/api/v1/teams_controller.rb @@ -13,7 +13,9 @@ module Api end def show - render jsonapi: @team, serializer: TeamSerializer + render jsonapi: @team, + serializer: TeamSerializer, + include: :created_by end private diff --git a/app/serializers/api/v1/team_serializer.rb b/app/serializers/api/v1/team_serializer.rb index ffe94acc0..62d13afae 100644 --- a/app/serializers/api/v1/team_serializer.rb +++ b/app/serializers/api/v1/team_serializer.rb @@ -4,6 +4,7 @@ module Api module V1 class TeamSerializer < ActiveModel::Serializer attributes :id, :name, :description, :space_taken + belongs_to :created_by, serializer: UserSerializer end end end