20 lines
416 B
JavaScript
20 lines
416 B
JavaScript
import { DELETE } from '../../sql/company.js';
|
|
|
|
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()
|
|
.input('companyId', companyId)
|
|
.query(DELETE);
|
|
};
|
|
}
|