mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-27 23:40:26 +01:00
added dumy request info to directly return an error on invalid API rule
This commit is contained in:
1 parent
3c6ce2de74
commit
9b73295a7c
3 files changed
+5
-4
No files matched your search
@@ -489,7 +489,7 @@ func (validator *collectionValidator) checkRule(value any) error {
|
||||
return nil // nothing to check
|
||||
}
|
||||
|
||||
r := NewRecordFieldResolver(validator.app, validator.new, nil, true)
|
||||
r := NewRecordFieldResolver(validator.app, validator.new, &RequestInfo{}, true)
|
||||
_, err := search.FilterData(vStr).BuildExpr(r)
|
||||
if err != nil {
|
||||
return validation.NewError("validation_invalid_rule", "Invalid rule. Raw error: "+err.Error())
|
||||
|
||||
Reference in new issue
Block a user