small changes to the queries

This commit is contained in:
Ale 2024-03-15 20:18:26 +01:00
parent cbcb100525
commit fd3977d224

View file

@ -27,12 +27,12 @@ export class MemberRepo {
} }
editAlter(alter: MemberModel){ editAlter(alter: MemberModel){
this.db.run("UPDATE members SET owner=?, prefix=?, name=?, profile_pic_url=?, color=? WHERE members.id ='" + alter.id + "'", this.db.run("UPDATE members SET owner=?, prefix=?, name=?, profile_pic_url=?, color=? WHERE members.id=?",
[alter.owner, alter.prefix, alter.name, alter.profile_pic_url, alter.color]) [alter.owner, alter.prefix, alter.name, alter.profile_pic_url, alter.color, alter.id])
} }
delete(alterId: number) { delete(alterId: number) {
this.db.run("DELETE FROM members WHERE members.id='"+ alterId + "'") this.db.run("DELETE FROM members WHERE members.id=?", [alterId])
} }
} }