Add ability to edit participant name and phone number
This commit is contained in:
@@ -339,6 +339,10 @@ export const participantOps = {
|
||||
db.prepare('DELETE FROM participants WHERE id = ?').run(id);
|
||||
},
|
||||
|
||||
update: (id: number, name: string, phone: string | null): void => {
|
||||
db.prepare('UPDATE participants SET name = ?, phone = ? WHERE id = ?').run(name, phone, id);
|
||||
},
|
||||
|
||||
isTokenAvailable: (token: string): boolean => {
|
||||
const result = db.prepare('SELECT id FROM participants WHERE token = ?').get(token);
|
||||
return !result;
|
||||
|
||||
Reference in New Issue
Block a user