u
This commit is contained in:
@@ -5,6 +5,16 @@ INNER JOIN google_auth ga ON ga.id = cu.google_auth_id
|
||||
WHERE ga.email = @email
|
||||
`;
|
||||
|
||||
export const GET_COMPANY_ACCESS = `
|
||||
SELECT
|
||||
c.root_category_id AS rootCategoryId,
|
||||
cu.id AS companyuserId
|
||||
FROM company c
|
||||
LEFT JOIN companyuser cu
|
||||
ON cu.company_id = c.id AND cu.google_auth_id = @authId
|
||||
WHERE c.id = @companyId
|
||||
`;
|
||||
|
||||
export const ADD = `
|
||||
INSERT INTO companyuser (google_auth_id, company_id)
|
||||
OUTPUT INSERTED.id
|
||||
|
||||
Reference in New Issue
Block a user