docs: add JSDoc headers to all externally exported store functions

This commit is contained in:
seb
2026-08-07 03:58:48 +02:00
parent c290fe8f4b
commit 4833acd680
101 changed files with 1134 additions and 0 deletions

View File

@@ -1,5 +1,16 @@
import { GET_BY_EMAIL } from '../../sql/companyuser.js';
/**
* Returns the company user ids associated with the given email address.
*
* @param {object} pool - The mssql connection pool.
* @returns {Function} An async function that resolves the company user ids for an email.
*
* @example
* const fn = getByEmail(pool);
* const ids = await fn('user@example.com');
* // => [1, 2, 3]
*/
export default function getByEmail(pool) {
return async (email) => {
const result = await pool