printWidth: 100

This commit is contained in:
Christopher committed 2021-03-02 21:03:06 +01:00
1 parent d27aeb3b0e
commit 6f4ee009a9
63 files changed
+602 -223

No files matched your search

+17 -4
View File
@@ -24,15 +24,28 @@ async function fetchAllContacts(identifier: string): Promise<Contacts[]> {
return contacts;
}
async function addContact(identifier: string, number: string, display: string, avatar: string): Promise<any> {
const query = 'INSERT INTO npwd_phone_contacts (identifier, number, display, avatar) VALUES (?, ?, ?, ?)';
async function addContact(
identifier: string,
number: string,
display: string,
avatar: string,
): Promise<any> {
const query =
'INSERT INTO npwd_phone_contacts (identifier, number, display, avatar) VALUES (?, ?, ?, ?)';
const [result] = await pool.query(query, [identifier, number, display, avatar]);
}
async function updateContact(contact: Contacts, identifier: string): Promise<any> {
const query = 'UPDATE npwd_phone_contacts SET number = ?, display = ?, avatar = ? WHERE id = ? AND identifier = ?';
await pool.query(query, [contact.number, contact.display, contact.avatar, contact.id, identifier]);
const query =
'UPDATE npwd_phone_contacts SET number = ?, display = ?, avatar = ? WHERE id = ? AND identifier = ?';
await pool.query(query, [
contact.number,
contact.display,
contact.avatar,
contact.id,
identifier,
]);
}
async function deleteContact(contact: ContactId, identifier: string): Promise<any> {