correct
This commit is contained in:
parent
085a8718e0
commit
a2dca94dca
@ -66,7 +66,6 @@ func GenericDeleteOne(id string, a Accessor) (DBObject, int, error) {
|
||||
return nil, 403, errors.New("you are not allowed to delete :" + a.GetType().String())
|
||||
}
|
||||
if err != nil {
|
||||
a.GetLogger().Error().Msg("Could not retrieve " + id + " to db. Error: " + err.Error())
|
||||
return nil, code, err
|
||||
}
|
||||
if a.ShouldVerifyAuth() && !res.VerifyAuth(a.GetRequest()) {
|
||||
@ -114,7 +113,6 @@ func GenericLoadOne[T DBObject](id string, f func(DBObject) (DBObject, int, erro
|
||||
var data T
|
||||
res_mongo, code, err := mongo.MONGOService.LoadOne(id, a.GetType().String())
|
||||
if err != nil {
|
||||
a.GetLogger().Error().Msg("Could not retrieve " + id + " from db. Error: " + err.Error())
|
||||
return nil, code, err
|
||||
}
|
||||
res_mongo.Decode(&data)
|
||||
@ -128,7 +126,6 @@ func genericLoadAll[T DBObject](res *mgb.Cursor, code int, err error, onlyDraft
|
||||
objs := []ShallowDBObject{}
|
||||
var results []T
|
||||
if err != nil {
|
||||
a.GetLogger().Error().Msg("Could not retrieve any from db. Error: " + err.Error())
|
||||
return nil, code, err
|
||||
}
|
||||
if err = res.All(mongo.MngoCtx, &results); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user