Merge pull request #100 from project-error/RockySouthpaw-patch-1

Fix: Call history is now sorted.
This commit is contained in:
Christopher Gjelten authored and GitHub committed 2021-02-17 16:50:09 +01:00
commit 13cd6b6f97
1 file changed
+1 -1
+1 -1
View File
@@ -56,7 +56,7 @@ async function updateCall(call: ICall, isAccepted: boolean, end: number) {
async function fetchCalls(phoneNumber: string): Promise<ICall[]> { async function fetchCalls(phoneNumber: string): Promise<ICall[]> {
const query = const query =
'SELECT * FROM npwd_calls WHERE receiver = ? OR transmitter = ?'; 'SELECT * FROM npwd_calls WHERE receiver = ? OR transmitter = ? ORDER BY id DESC';
const [result] = await pool.query(query, [phoneNumber, phoneNumber]); const [result] = await pool.query(query, [phoneNumber, phoneNumber]);
const calls = <ICall[]>result; const calls = <ICall[]>result;
return calls; return calls;