Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
9bf8ab70
Commit
9bf8ab70
authored
Apr 21, 2026
by
IanShaw027
Browse files
Fix postgres provider grant queries
parent
dcbddef6
Changes
2
Show whitespace changes
Inline
Side-by-side
backend/internal/service/auth_oauth_first_bind.go
View file @
9bf8ab70
...
...
@@ -61,7 +61,7 @@ func (s *AuthService) applyProviderDefaultSettingsOnFirstBind(
if
err
:=
client
.
Driver
()
.
Exec
(
ctx
,
`INSERT INTO user_provider_default_grants (user_id, provider_type, grant_reason)
VALUES (
?, ?, ?
)
VALUES (
$1, $2, $3
)
ON CONFLICT (user_id, provider_type, grant_reason) DO NOTHING`
,
[]
any
{
userID
,
strings
.
TrimSpace
(
providerType
),
"first_bind"
},
&
result
,
...
...
backend/internal/service/auth_service.go
View file @
9bf8ab70
...
...
@@ -855,7 +855,7 @@ func (s *AuthService) hasProviderGrantRecord(
rows
,
err
:=
s
.
entClient
.
QueryContext
(
ctx
,
`SELECT 1 FROM user_provider_default_grants WHERE user_id =
?
AND provider_type =
?
AND grant_reason =
?
LIMIT 1`
,
`SELECT 1 FROM user_provider_default_grants WHERE user_id =
$1
AND provider_type =
$2
AND grant_reason =
$3
LIMIT 1`
,
userID
,
strings
.
TrimSpace
(
providerType
),
strings
.
TrimSpace
(
grantReason
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment