docs: add JSDoc headers to all externally exported store functions
This commit is contained in:
@@ -5,6 +5,17 @@ import langEnsure from '../lang/ensure.js';
|
||||
import taxEnsure from '../tax/ensure.js';
|
||||
import request from '../request.js';
|
||||
|
||||
/**
|
||||
* Updates an existing company's name, language and tax rates.
|
||||
*
|
||||
* @param {object} pool - The mssql connection pool.
|
||||
* @returns {Function} An async function that updates a company.
|
||||
*
|
||||
* @example
|
||||
* const fn = update(pool);
|
||||
* const result = await fn(1, { iso639: 'de', name: 'Acme', taxrate: 19, reducedtaxrate: 7 });
|
||||
* // => { id, rootCategoryId, languageId, taxrateId, reducedtaxrateId, taxfreerateId }
|
||||
*/
|
||||
export default function update(pool) {
|
||||
const byId = getById(pool);
|
||||
const byName = getByName(pool);
|
||||
|
||||
Reference in New Issue
Block a user