mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
@ -17,6 +17,7 @@ INSERT INTO
|
||||
id,
|
||||
lifetime_seconds,
|
||||
hashed_secret,
|
||||
ip_address,
|
||||
user_id,
|
||||
last_used,
|
||||
expires_at,
|
||||
@ -35,7 +36,7 @@ VALUES
|
||||
WHEN 0 THEN 86400
|
||||
ELSE @lifetime_seconds::bigint
|
||||
END
|
||||
, @hashed_secret, @user_id, @last_used, @expires_at, @created_at, @updated_at, @login_type, @oauth_access_token, @oauth_refresh_token, @oauth_id_token, @oauth_expiry) RETURNING *;
|
||||
, @hashed_secret, @ip_address, @user_id, @last_used, @expires_at, @created_at, @updated_at, @login_type, @oauth_access_token, @oauth_refresh_token, @oauth_id_token, @oauth_expiry) RETURNING *;
|
||||
|
||||
-- name: UpdateAPIKeyByID :exec
|
||||
UPDATE
|
||||
@ -43,9 +44,10 @@ UPDATE
|
||||
SET
|
||||
last_used = $2,
|
||||
expires_at = $3,
|
||||
oauth_access_token = $4,
|
||||
oauth_refresh_token = $5,
|
||||
oauth_expiry = $6
|
||||
ip_address = $4,
|
||||
oauth_access_token = $5,
|
||||
oauth_refresh_token = $6,
|
||||
oauth_expiry = $7
|
||||
WHERE
|
||||
id = $1;
|
||||
|
||||
|
Reference in New Issue
Block a user