v12.0.0 - initial commit
This commit is contained in:
commit
e2c49ea43c
1145 changed files with 97211 additions and 0 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