u
This commit is contained in:
@@ -11,7 +11,7 @@ export default function create(pool) {
|
||||
const ensureLang = langEnsure(pool);
|
||||
const ensureTax = taxEnsure(pool);
|
||||
|
||||
return async ({ iso639, name, taxrate, reducedtaxrate, authId }) => {
|
||||
return async ({ iso639, name, taxrate, reducedtaxrate, googleAuthId }) => {
|
||||
const tx = pool.transaction();
|
||||
await tx.begin();
|
||||
|
||||
@@ -46,7 +46,7 @@ export default function create(pool) {
|
||||
|
||||
await request(pool, tx)
|
||||
.input('companyId', companyId)
|
||||
.input('authId', authId)
|
||||
.input('googleAuthId', googleAuthId)
|
||||
.query(ADD_COMPANYUSER);
|
||||
|
||||
await tx.commit();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { LIST } from '../../sql/company.js';
|
||||
|
||||
export default function list(pool) {
|
||||
return async (authId) => {
|
||||
return async (googleAuthId) => {
|
||||
const result = await pool
|
||||
.request()
|
||||
.input('authId', authId)
|
||||
.input('googleAuthId', googleAuthId)
|
||||
.query(LIST);
|
||||
return result.recordset;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user