mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
feat(calling/client|server): update Call interface
This commit is contained in:
1 parent
04afb24bda
commit
8ad85d8209
2 files changed
+5
-5
No files matched your search
@@ -6,7 +6,7 @@ import {
|
||||
useIdentifier,
|
||||
} from './functions';
|
||||
import { XPlayer } from 'esx.js/@types/server';
|
||||
import { ICall, ICallUI } from '../../phone/src/common/typings/call';
|
||||
import { ICall } from '../../phone/src/common/typings/call';
|
||||
|
||||
import { pool } from './db';
|
||||
|
||||
@@ -43,11 +43,11 @@ async function updateCall(call: ICall, isAccepted: boolean) {
|
||||
await pool.query(query, [isAccepted, call.transmitter]);
|
||||
}
|
||||
|
||||
async function fetchCalls(phoneNumber: string): Promise<ICallUI[]> {
|
||||
async function fetchCalls(phoneNumber: string): Promise<ICall[]> {
|
||||
const query =
|
||||
'SELECT * FROM npwd_calls WHERE receiver = ? OR transmitter = ?';
|
||||
const [result] = await pool.query(query, [phoneNumber, phoneNumber]);
|
||||
const calls = <ICallUI[]>result;
|
||||
const calls = <ICall[]>result;
|
||||
return calls;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user