prospect
This commit is contained in:
@@ -2,6 +2,7 @@ package resources
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"slices"
|
"slices"
|
||||||
|
|
||||||
"cloud.o-forge.io/core/oc-lib/dbs"
|
"cloud.o-forge.io/core/oc-lib/dbs"
|
||||||
@@ -36,6 +37,7 @@ func NewAccessor[T ResourceInterface](t tools.DataType, request *tools.APIReques
|
|||||||
case tools.STORAGE_RESOURCE:
|
case tools.STORAGE_RESOURCE:
|
||||||
return &StorageResource{}
|
return &StorageResource{}
|
||||||
case tools.PROCESSING_RESOURCE:
|
case tools.PROCESSING_RESOURCE:
|
||||||
|
fmt.Println("It's a processing resource")
|
||||||
return &ProcessingResource{}
|
return &ProcessingResource{}
|
||||||
case tools.WORKFLOW_RESOURCE:
|
case tools.WORKFLOW_RESOURCE:
|
||||||
return &WorkflowResource{}
|
return &WorkflowResource{}
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ func GenericLoadOne[T DBObject](id string, data T, f func(DBObject) (DBObject, i
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, code, err
|
return nil, code, err
|
||||||
}
|
}
|
||||||
fmt.Println("APPLY", data)
|
fmt.Println("APPLY", data, res_mongo)
|
||||||
res_mongo.Decode(&data)
|
res_mongo.Decode(&data)
|
||||||
if a.ShouldVerifyAuth() && !data.VerifyAuth("get", a.GetRequest()) {
|
if a.ShouldVerifyAuth() && !data.VerifyAuth("get", a.GetRequest()) {
|
||||||
return nil, 403, errors.New("you are not allowed to access :" + a.GetType().String())
|
return nil, 403, errors.New("you are not allowed to access :" + a.GetType().String())
|
||||||
|
|||||||
Reference in New Issue
Block a user