chore: use monorepo organization
This commit is contained in:
parent
deaf7d6ecc
commit
a687827f7e
1099 changed files with 8184 additions and 11535 deletions
32
packages/server/lib/compliance_overrides.js
Normal file
32
packages/server/lib/compliance_overrides.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
const db = require('./db')
|
||||
const uuid = require('uuid')
|
||||
|
||||
/**
|
||||
* Create new compliance override
|
||||
*
|
||||
* @name add
|
||||
* @function
|
||||
*
|
||||
* @param {object} complianceOverride Compliance override object
|
||||
*
|
||||
* @returns {object} Newly created compliance override
|
||||
*/
|
||||
function add (complianceOverride) {
|
||||
const sql = `insert into compliance_overrides
|
||||
(id,
|
||||
customer_id,
|
||||
compliance_type,
|
||||
override_at,
|
||||
override_by,
|
||||
verification)
|
||||
values ($1, $2, $3, now(), $4, $5) returning *`
|
||||
return db.one(sql, [
|
||||
uuid.v4(),
|
||||
complianceOverride.customerId,
|
||||
complianceOverride.complianceType,
|
||||
complianceOverride.overrideBy,
|
||||
complianceOverride.verification
|
||||
])
|
||||
}
|
||||
|
||||
module.exports = { add }
|
||||
Loading…
Add table
Add a link
Reference in a new issue