Simplify & Live Bug

This commit is contained in:
mr
2026-04-08 15:40:44 +02:00
parent dbbad79480
commit 284533ad1d
12 changed files with 38 additions and 19 deletions

View File

@@ -12,11 +12,10 @@ import (
type ResourceMongoAccessor[T ResourceInterface] struct {
utils.AbstractAccessor[ResourceInterface] // AbstractAccessor contains the basic fields of an accessor (model, caller)
generateData func() utils.DBObject
}
// New creates a new instance of the computeMongoAccessor
func NewAccessor[T ResourceInterface](t tools.DataType, request *tools.APIRequest, g func() utils.DBObject) *ResourceMongoAccessor[T] {
func NewAccessor[T ResourceInterface](t tools.DataType, request *tools.APIRequest) *ResourceMongoAccessor[T] {
if !slices.Contains([]tools.DataType{
tools.COMPUTE_RESOURCE, tools.STORAGE_RESOURCE,
tools.PROCESSING_RESOURCE, tools.WORKFLOW_RESOURCE,
@@ -47,7 +46,6 @@ func NewAccessor[T ResourceInterface](t tools.DataType, request *tools.APIReques
return nil
},
},
generateData: g,
}
}