From 1a4694c8913abdd36574030ef73f7bb294fe1f54 Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 14 Jan 2025 14:50:55 +0100 Subject: [PATCH] light modification --- models/resources/storage.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/resources/storage.go b/models/resources/storage.go index 27ea0a4..8dc2d59 100644 --- a/models/resources/storage.go +++ b/models/resources/storage.go @@ -17,8 +17,8 @@ import ( type StorageResource struct { AbstractIntanciatedResource[*StorageResourceInstance] // AbstractResource contains the basic fields of an object (id, name) Source string `bson:"source,omitempty" json:"source,omitempty"` // Source is the source of the storage - Type common.StorageType `bson:"type,omitempty"` // Type is the type of the storage - TypeJSON string `json:"type,omitempty"` + StorageType common.StorageType `bson:"storage_type,omitempty"` // Type is the type of the storage + Type string `json:"type,omitempty"` Acronym string `bson:"acronym,omitempty" json:"acronym,omitempty"` // Acronym is the acronym of the storage } @@ -27,7 +27,7 @@ func (d *StorageResource) GetAccessor(request *tools.APIRequest) utils.Accessor } func (r *StorageResource) Transform() utils.DBObject { - r.TypeJSON = r.Type.String() + r.Type = r.StorageType.String() return r }