src/db/models/Template.js
// remove user_id x key in database
remove user_id x key in database
remove user_id x key in database
async function remove(client, user_id, key) {
    const rowCount = await client.DB[NAME].TABLE.destroy({ where: { "user_id": user_id, "key": key } })
    if (rowCount) {
        return true
    } else {
        client.logger.log("error", `Could not delete tag ${user_id} x ${key} in database ${NAME}!`)
        return false
    }
}
async function remove ( client , user_id , key ) { const rowCount = await client . DB [ NAME ] . TABLE . destroy ( { where : { "user_id" : user_id , "key" : key } } ) if ( rowCount ) { return true } else { client . logger . log ( "error" , ` ${ user_id } ${ key } ${ NAME } ` ) return false } }
remove user_id x key in database
remove user_id x key in database