light modification
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
|
||||
type AbstractResource struct {
|
||||
utils.AbstractObject // AbstractObject contains the basic fields of an object (id, name)
|
||||
Type string `json:"type,omitempty" bson:"type,omitempty"` // Type is the type of the resource
|
||||
Logo string `json:"logo,omitempty" bson:"logo,omitempty" validate:"required"` // Logo is the logo of the resource
|
||||
Description string `json:"description,omitempty" bson:"description,omitempty"` // Description is the description of the resource
|
||||
ShortDescription string `json:"short_description,omitempty" bson:"short_description,omitempty" validate:"required"` // ShortDescription is the short description of the resource
|
||||
@@ -85,6 +86,7 @@ func (abs *AbstractIntanciatedResource[T]) SetAllowedInstances(request *tools.AP
|
||||
}
|
||||
|
||||
func (d *AbstractIntanciatedResource[T]) Trim() {
|
||||
d.Type = d.GetType()
|
||||
if ok, _ := (&peer.Peer{AbstractObject: utils.AbstractObject{UUID: d.CreatorID}}).IsMySelf(); !ok {
|
||||
for _, instance := range d.Instances {
|
||||
instance.ClearPeerGroups()
|
||||
|
||||
Reference in New Issue
Block a user