mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-26 01:46:20 +08:00
Fixed serializer types
This commit is contained in:
parent
837fbaa35f
commit
6a4801466d
|
@ -3,7 +3,7 @@
|
||||||
module Api
|
module Api
|
||||||
module V1
|
module V1
|
||||||
class ConnectionSerializer < ActiveModel::Serializer
|
class ConnectionSerializer < ActiveModel::Serializer
|
||||||
type :connection
|
type :connections
|
||||||
attributes :id, :input_id, :output_id
|
attributes :id, :input_id, :output_id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
module Api
|
module Api
|
||||||
module V1
|
module V1
|
||||||
class ExperimentSerializer < ActiveModel::Serializer
|
class ExperimentSerializer < ActiveModel::Serializer
|
||||||
type :experiment
|
type :experiments
|
||||||
attributes :id, :name, :description, :project_id, :created_by_id,
|
attributes :id, :name, :description, :project_id, :created_by_id,
|
||||||
:archived, :created_at, :updated_at
|
:archived, :created_at, :updated_at
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
module Api
|
module Api
|
||||||
module V1
|
module V1
|
||||||
class MyModuleGroupSerializer < ActiveModel::Serializer
|
class MyModuleGroupSerializer < ActiveModel::Serializer
|
||||||
type :MyModuleGroup
|
type :task_groups
|
||||||
attributes :id, :created_at, :updated_at, :created_by_id, :experiment_id
|
attributes :id, :created_at, :updated_at, :created_by_id, :experiment_id
|
||||||
belongs_to :experiment, serializer: ExperimentSerializer
|
belongs_to :experiment, serializer: ExperimentSerializer
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue