light modification

This commit is contained in:
mr 2025-01-17 13:48:01 +01:00
parent f72ceecc19
commit e5c7dbe4cb

View File

@ -124,7 +124,7 @@ func genericLoadAll[T DBObject](res *mgb.Cursor, code int, err error, onlyDraft
if err = res.All(mongo.MngoCtx, &results); err != nil {
return nil, 404, err
}
fmt.Println("results", results)
fmt.Println("results", results, res)
for _, r := range results {
if !r.VerifyAuth(a.GetRequest()) || f(r) == nil || (onlyDraft && !r.IsDrafted()) || (!onlyDraft && r.IsDrafted()) {
continue