docs: add JSDoc headers to all externally exported store functions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user