mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
Merge pull request #100 from project-error/RockySouthpaw-patch-1
Fix: Call history is now sorted.
This commit is contained in:
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[]> {
|
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;
|
||||||
|
|||||||
Reference in new issue
Block a user