mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Fix: Call history is now sorted.
Call history Is now ordered by ID so recent calls show up first instead of last. Previously it was just at the bottom. (Courtesy of Chip)
This commit is contained in:
1 parent
17f5fb62d9
commit
6be68c8e9f
1 file changed
+1
-1
@@ -56,7 +56,7 @@ async function updateCall(call: ICall, isAccepted: boolean, end: number) {
|
||||
|
||||
async function fetchCalls(phoneNumber: string): Promise<ICall[]> {
|
||||
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 calls = <ICall[]>result;
|
||||
return calls;
|
||||
|
||||
Reference in new issue
Block a user