This commit is contained in:
mr 2024-12-03 08:33:36 +01:00
parent 599a614480
commit 6042d47700

View File

@ -212,6 +212,7 @@ func genericLoadAll[T DBObject](res *mgb.Cursor, code int, err error, f func(DBO
if err = res.All(mongo.MngoCtx, &results); err != nil { if err = res.All(mongo.MngoCtx, &results); err != nil {
return nil, 404, err return nil, 404, err
} }
fmt.Println("results 1", res, results)
for _, r := range results { for _, r := range results {
fmt.Println("results", r.VerifyAuth(a.GetPeerID(), a.GetGroups())) fmt.Println("results", r.VerifyAuth(a.GetPeerID(), a.GetGroups()))
if !r.VerifyAuth(a.GetPeerID(), a.GetGroups()) { if !r.VerifyAuth(a.GetPeerID(), a.GetGroups()) {