fix: small fixes on loyalty module
This commit is contained in:
parent
768b5a30e1
commit
29257c42ec
1 changed files with 3 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ function getAvailableIndividualDiscounts () {
|
|||
const sql = `SELECT * from individual_discounts WHERE soft_deleted=false`
|
||||
return db.any(sql).then(res => _.map(it => ({
|
||||
id: it.id,
|
||||
idType: it.identification,
|
||||
idType: _.camelCase(it.identification),
|
||||
value: it.value,
|
||||
discount: it.discount,
|
||||
softDeleted: it.soft_deleted
|
||||
|
|
@ -44,8 +44,8 @@ function createIndividualDiscount (idType, value, discount) {
|
|||
idNumber: 'id_number'
|
||||
}
|
||||
|
||||
const sql = `INSERT INTO individual_discounts (id, identification, value, discount) VALUES ($1, $2, $3, $4) RETURNING *`
|
||||
return db.one(sql, [uuid.v4(), idTypes[idType], value, discount])
|
||||
const sql = `INSERT INTO individual_discounts (id, identification, value, discount) VALUES ($1, $2, $3, $4)`
|
||||
return db.none(sql, [uuid.v4(), idTypes[idType], value, discount])
|
||||
}
|
||||
|
||||
function deleteIndividualDiscount (id) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue