diff --git a/app/serializers/api/v1/activity_serializer.rb b/app/serializers/api/v1/activity_serializer.rb index 11dee4dc1..70332ce2d 100644 --- a/app/serializers/api/v1/activity_serializer.rb +++ b/app/serializers/api/v1/activity_serializer.rb @@ -4,8 +4,8 @@ module Api module V1 class ActivitySerializer < ActiveModel::Serializer type :activities - attributes :id, :my_module_id, :user_id, :type_of, :message, :created_at, - :updated_at, :project_id, :experiment_id + attributes :id, :my_module_id, :user_id, :type_of, :message, + :project_id, :experiment_id belongs_to :my_module, serializer: MyModuleSerializer end end diff --git a/app/serializers/api/v1/experiment_serializer.rb b/app/serializers/api/v1/experiment_serializer.rb index db9c0dd7e..ae15e44fb 100644 --- a/app/serializers/api/v1/experiment_serializer.rb +++ b/app/serializers/api/v1/experiment_serializer.rb @@ -4,8 +4,8 @@ module Api module V1 class ExperimentSerializer < ActiveModel::Serializer type :experiments - attributes :id, :name, :description, :project_id, :created_by_id, - :archived, :created_at, :updated_at + attributes :id, :name, :description, :created_by_id, :archived + end end end diff --git a/app/serializers/api/v1/my_module_group_serializer.rb b/app/serializers/api/v1/my_module_group_serializer.rb index 0ec8e2dca..4a1d5c46b 100644 --- a/app/serializers/api/v1/my_module_group_serializer.rb +++ b/app/serializers/api/v1/my_module_group_serializer.rb @@ -4,7 +4,7 @@ module Api module V1 class MyModuleGroupSerializer < ActiveModel::Serializer type :task_groups - attributes :id, :created_at, :updated_at, :created_by_id, :experiment_id + attributes :id, :created_by_id, :experiment_id belongs_to :experiment, serializer: ExperimentSerializer end end diff --git a/app/serializers/api/v1/my_module_repository_row_serializer.rb b/app/serializers/api/v1/my_module_repository_row_serializer.rb index db89f7515..abab1d3b5 100644 --- a/app/serializers/api/v1/my_module_repository_row_serializer.rb +++ b/app/serializers/api/v1/my_module_repository_row_serializer.rb @@ -4,8 +4,8 @@ module Api module V1 class MyModuleRepositoryRowSerializer < ActiveModel::Serializer type :task_inventory_rows - attributes :id, :repository_row_id, :my_module_id, :assigned_by_id, - :created_at, :updated_at + attributes :id, :repository_row_id, :my_module_id + belongs_to :my_module, serializer: MyModuleSerializer end end diff --git a/app/serializers/api/v1/my_module_tag_serializer.rb b/app/serializers/api/v1/my_module_tag_serializer.rb index d395887e7..be94a1641 100644 --- a/app/serializers/api/v1/my_module_tag_serializer.rb +++ b/app/serializers/api/v1/my_module_tag_serializer.rb @@ -4,7 +4,7 @@ module Api module V1 class MyModuleTagSerializer < ActiveModel::Serializer type :task_tags - attributes :id, :my_module_id, :tag_id, :created_by_id + attributes :id, :my_module_id, :tag_id belongs_to :my_module, serializer: MyModuleSerializer end end diff --git a/app/serializers/api/v1/protocol_serializer.rb b/app/serializers/api/v1/protocol_serializer.rb index 33366de9e..3c4c489ea 100644 --- a/app/serializers/api/v1/protocol_serializer.rb +++ b/app/serializers/api/v1/protocol_serializer.rb @@ -6,9 +6,7 @@ module Api type :protocols attributes :id, :name, :authors, :description, :added_by_id, :my_module_id, :team_id, :protocol_type, :parent_id, - :parent_updated_at, :archived_by_id, :archived_on, - :restored_by_id, :restored_on, :created_at, :updated_at, - :published_on, :nr_of_linked_children + :nr_of_linked_children belongs_to :my_module, serializer: MyModuleSerializer end end diff --git a/app/serializers/api/v1/result_serializer.rb b/app/serializers/api/v1/result_serializer.rb index e5cae0ca8..0fbe203cd 100644 --- a/app/serializers/api/v1/result_serializer.rb +++ b/app/serializers/api/v1/result_serializer.rb @@ -4,10 +4,8 @@ module Api module V1 class ResultSerializer < ActiveModel::Serializer type :results - attributes :id, :name, :my_module_id, :user_id, :created_at, :updated_at, - :archived, :archived_on, :last_modified_by_id, :archived_by_id, - :restored_by_id, :restored_on, :result_text, :result_table, - :result_asset + attributes :id, :name, :my_module_id, :user_id, :archived, :result_text, + :result_table, :result_asset belongs_to :my_module, serializer: MyModuleSerializer end diff --git a/app/serializers/api/v1/user_my_module_serializer.rb b/app/serializers/api/v1/user_my_module_serializer.rb index cee99d9f3..8425a5d95 100644 --- a/app/serializers/api/v1/user_my_module_serializer.rb +++ b/app/serializers/api/v1/user_my_module_serializer.rb @@ -4,8 +4,8 @@ module Api module V1 class UserMyModuleSerializer < ActiveModel::Serializer type :user_tasks - attributes :id, :user_id, :my_module_id, :created_at, - :updated_at, :assigned_by_id + attributes :id, :user_id, :my_module_id + belongs_to :my_module, serializer: MyModuleSerializer end end