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