mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-11 23:54:43 +08:00
Rename type for rows and cells serializers [SCI-2614][SCI-2616][SCI-2617]
This commit is contained in:
parent
6c59e1e159
commit
5efcacbf3d
3 changed files with 4 additions and 4 deletions
|
@ -3,10 +3,9 @@
|
||||||
module Api
|
module Api
|
||||||
module V1
|
module V1
|
||||||
class InventoryCellSerializer < ActiveModel::Serializer
|
class InventoryCellSerializer < ActiveModel::Serializer
|
||||||
attribute :id
|
type :inventory_cells
|
||||||
|
attributes :id, :data_type, :data
|
||||||
attribute :repository_column_id, key: :column_id
|
attribute :repository_column_id, key: :column_id
|
||||||
attribute :data_type
|
|
||||||
attribute :data
|
|
||||||
|
|
||||||
def data_type
|
def data_type
|
||||||
type_id = RepositoryColumn
|
type_id = RepositoryColumn
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
module Api
|
module Api
|
||||||
module V1
|
module V1
|
||||||
class InventoryItemSerializer < ActiveModel::Serializer
|
class InventoryItemSerializer < ActiveModel::Serializer
|
||||||
|
type :inventory_items
|
||||||
attributes :id, :name
|
attributes :id, :name
|
||||||
has_many :repository_cells, key: :inventory_cells,
|
has_many :repository_cells, key: :inventory_cells,
|
||||||
serializer: InventoryCellSerializer,
|
serializer: InventoryCellSerializer,
|
||||||
|
|
|
@ -4,7 +4,7 @@ module Api
|
||||||
module V1
|
module V1
|
||||||
class RepositoryListValueSerializer < ActiveModel::Serializer
|
class RepositoryListValueSerializer < ActiveModel::Serializer
|
||||||
attribute :formatted, key: :value
|
attribute :formatted, key: :value
|
||||||
attribute :repository_list_item_id, key: :list_item_id
|
attribute :repository_list_item_id, key: :inventory_list_item_id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue