make db queries more selective
This commit is contained in:
parent
e2509f3e18
commit
8f64ee83f8
@ -45,7 +45,7 @@ class UserRepository {
|
|||||||
`INSERT INTO users
|
`INSERT INTO users
|
||||||
(forge_id, forge_user_id, access_token, token_expires_at)
|
(forge_id, forge_user_id, access_token, token_expires_at)
|
||||||
VALUES ($1, $2, $3, $4)
|
VALUES ($1, $2, $3, $4)
|
||||||
RETURNING *`,
|
RETURNING user_id, forge_id, forge_user_id`,
|
||||||
[forgeId, forgeUserId, access_token, token_expires_at],
|
[forgeId, forgeUserId, access_token, token_expires_at],
|
||||||
);
|
);
|
||||||
return result.rows[0];
|
return result.rows[0];
|
||||||
@ -66,7 +66,7 @@ class UserRepository {
|
|||||||
DO UPDATE SET
|
DO UPDATE SET
|
||||||
access_token = EXCLUDED.access_token,
|
access_token = EXCLUDED.access_token,
|
||||||
token_expires_at = EXCLUDED.token_expires_at
|
token_expires_at = EXCLUDED.token_expires_at
|
||||||
RETURNING *`,
|
RETURNING user_id, forge_id, forge_user_id, access_token, token_expires_at`,
|
||||||
[forgeId, forgeUserId, access_token, token_expires_at],
|
[forgeId, forgeUserId, access_token, token_expires_at],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user