From d2461bab169b6c2ab222bb0e07ea05cc9e2d22e1 Mon Sep 17 00:00:00 2001 From: RockySouthpaw <55056068+RockySouthpaw@users.noreply.github.com> Date: Tue, 23 Feb 2021 22:13:36 -0500 Subject: [PATCH] Sort contacts alphabetically (#116) Does it for contacts app and phone app. --- resources/server/sv_contacts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/server/sv_contacts.ts b/resources/server/sv_contacts.ts index df03f81..56994c8 100644 --- a/resources/server/sv_contacts.ts +++ b/resources/server/sv_contacts.ts @@ -18,7 +18,7 @@ interface ContactId { } async function fetchAllContacts(identifier: string): Promise { - const query = 'SELECT * FROM npwd_phone_contacts WHERE identifier = ?'; + const query = 'SELECT * FROM npwd_phone_contacts WHERE identifier = ? ORDER BY display ASC'; const [results] = await pool.query(query, [identifier]); const contacts = results; return contacts;