Fix: adds created_by_operator constraint for duplicate checking

This commit is contained in:
Cesar 2020-12-30 17:58:21 +00:00
parent 6401d04180
commit c686ecc2aa
3 changed files with 20 additions and 1 deletions

View file

@ -14,7 +14,7 @@ const getBlacklist = () => {
// Delete row from blacklist table by crypto code and address
const deleteFromBlacklist = (cryptoCode, address) => {
return db.none(
'delete from blacklist where crypto_code = $1 and address = $2;',
`DELETE FROM blacklist WHERE created_by_operator = 't' AND crypto_code = $1 AND address = $2`,
[cryptoCode, address]
)
}