Link articlehistory to companyuser; store Google picture and sub on google_auth
This commit is contained in:
@@ -5,13 +5,25 @@ VALUES (@email)
|
||||
`;
|
||||
|
||||
export const GET_BY_EMAIL = `
|
||||
SELECT id, email, created_at AS createdAt, selected_company AS selectedCompanyId
|
||||
SELECT
|
||||
id,
|
||||
email,
|
||||
picture,
|
||||
sub,
|
||||
created_at AS createdAt,
|
||||
selected_company AS selectedCompanyId
|
||||
FROM google_auth
|
||||
WHERE email = @email
|
||||
`;
|
||||
|
||||
export const LIST_ALLOWED_EMAILS = `
|
||||
SELECT id, email, created_at AS createdAt, selected_company AS selectedCompanyId
|
||||
SELECT
|
||||
id,
|
||||
email,
|
||||
picture,
|
||||
sub,
|
||||
created_at AS createdAt,
|
||||
selected_company AS selectedCompanyId
|
||||
FROM google_auth
|
||||
ORDER BY email
|
||||
`;
|
||||
@@ -26,3 +38,9 @@ UPDATE google_auth
|
||||
SET selected_company = @companyId
|
||||
WHERE id = @googleAuthId
|
||||
`;
|
||||
|
||||
export const SET_PROFILE = `
|
||||
UPDATE google_auth
|
||||
SET picture = @picture, sub = @sub
|
||||
WHERE id = @googleAuthId
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user