This commit is contained in:
seb
2026-07-31 05:57:23 +02:00
parent b99c3a9ec7
commit 02bca8e236
14 changed files with 93 additions and 132 deletions

View File

@@ -4,27 +4,21 @@ OUTPUT INSERTED.id
VALUES (@email)
`;
export const GET_BY_ID = `
SELECT id, email, created_at, selected_company
FROM google_auth
WHERE id = @id
`;
export const GET_BY_EMAIL = `
SELECT id, email, created_at, selected_company
SELECT id, email, created_at AS createdAt, selected_company AS selectedCompanyId
FROM google_auth
WHERE email = @email
`;
export const LIST = `
SELECT id, email, created_at, selected_company
export const LIST_ALLOWED_EMAILS = `
SELECT id, email, created_at AS createdAt, selected_company AS selectedCompanyId
FROM google_auth
ORDER BY id
ORDER BY email
`;
export const DEL = `
export const REMOVE_ALLOWED_EMAIL = `
DELETE FROM google_auth
WHERE id = @id
WHERE email = @email
`;
export const SET_SELECTED_COMPANY = `