This commit is contained in:
seb
2026-07-31 00:08:50 +02:00
parent 93e52cd513
commit 6bdac7e543
17 changed files with 520 additions and 24 deletions

View File

@@ -0,0 +1,16 @@
import sql from 'mssql';
import { GET_BY_COMPANY_USER_ID } from '../../sql/company.js';
export default function getByCompanyUserId(pool) {
return async (companyUserId) => {
const result = await pool
.request()
.input('companyUserId', sql.Int, companyUserId)
.query(GET_BY_COMPANY_USER_ID);
const row = result.recordset[0];
if (!row) return null;
return [row.id, row.default_language_id, row.root_category_id, row.name];
};
}