mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-04 12:14:37 +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 V1
|
||||
class InventoryCellSerializer < ActiveModel::Serializer
|
||||
attribute :id
|
||||
type :inventory_cells
|
||||
attributes :id, :data_type, :data
|
||||
attribute :repository_column_id, key: :column_id
|
||||
attribute :data_type
|
||||
attribute :data
|
||||
|
||||
def data_type
|
||||
type_id = RepositoryColumn
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
module Api
|
||||
module V1
|
||||
class InventoryItemSerializer < ActiveModel::Serializer
|
||||
type :inventory_items
|
||||
attributes :id, :name
|
||||
has_many :repository_cells, key: :inventory_cells,
|
||||
serializer: InventoryCellSerializer,
|
||||
|
|
|
@ -4,7 +4,7 @@ module Api
|
|||
module V1
|
||||
class RepositoryListValueSerializer < ActiveModel::Serializer
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue