This commit is contained in:
seb
2026-08-07 05:21:56 +02:00
parent 70e0a9ddc4
commit 396389457f
22 changed files with 225 additions and 242 deletions

View File

@@ -1,16 +1,15 @@
import { DELETE } from '../../sql/company.js';
/**
* Deletes a company by its id.
*
* @param {object} pool - The mssql connection pool.
* @returns {Function} An async function that deletes a company.
*
* @example
* const fn = del(pool);
* await fn(1);
*/
export default function del(pool) {
/**
* Deletes a company by its id.
*
* @param {number} companyId - The id of the company to delete.
* @returns {Promise<void>}
*
* @example
* await store.company.delete(1);
*/
return async (companyId) => {
await pool
.request()