mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-06 12:07:25 +01:00
replaced exists bool db scans with int for broader drivers compatibility
This commit is contained in:
1 parent
0ebe9c4faa
commit
a4a228b368
11 files changed
+25
-23
No files matched your search
@@ -146,7 +146,7 @@ func wantsMFA(e *core.RequestEvent, record *core.Record) (bool, error) {
|
||||
return true, err
|
||||
}
|
||||
|
||||
var exists bool
|
||||
var exists int
|
||||
|
||||
query := e.App.RecordQuery(record.Collection()).
|
||||
Select("(1)").
|
||||
@@ -165,7 +165,7 @@ func wantsMFA(e *core.RequestEvent, record *core.Record) (bool, error) {
|
||||
return true, err
|
||||
}
|
||||
|
||||
return exists, nil
|
||||
return exists > 0, nil
|
||||
}
|
||||
|
||||
// checkMFA handles any MFA auth checks that needs to be performed for the specified request event.
|
||||
|
||||
Reference in new issue
Block a user