I would like to be able to handle things like "email already taken" during registration queries. The only question addressing this that I've found is here
and I haven't found it helpful.
Here's my query function
newMasterAcc(input, callback){
let newQuery = {
sql: "INSERT INTO masteracc SET ?",
values: [input],
callback: (error, results, fields) => {
if(error){
callback(false);
}
else{
callback();
}
}
}
this.pool.query(newQuery);
}