mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
refactor(calls): refactor of call architecture
This commit is contained in:
1 parent
92b687b130
commit
36d1e993bd
21 files changed
+361
-185
No files matched your search
@@ -17,12 +17,12 @@ export class CallsRepo {
|
||||
async fetchCalls(
|
||||
phoneNumber: string,
|
||||
limit = FetchDefaultLimits.CALLS_FETCH_LIMIT,
|
||||
): Promise<CallHistoryItem[] | CallHistoryItem> {
|
||||
): Promise<CallHistoryItem[]> {
|
||||
const query =
|
||||
'SELECT * FROM npwd_calls WHERE receiver = ? OR transmitter = ? ORDER BY id DESC LIMIT ?';
|
||||
const [result] = await pool.query(query, [phoneNumber, phoneNumber, limit]);
|
||||
|
||||
return <CallHistoryItem[] | CallHistoryItem>result;
|
||||
return <CallHistoryItem[]>result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user