mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +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
@@ -1,6 +1,6 @@
|
|||||||
import { ESX } from './client';
|
import { ESX } from './client';
|
||||||
import events from '../utils/events';
|
import events from '../utils/events';
|
||||||
import { ICall, ICallUI } from '../../phone/src/common/typings/call';
|
import { ICall } from '../../phone/src/common/typings/call';
|
||||||
import config from '../utils/config'
|
import config from '../utils/config'
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ function openCallModal(show: boolean) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
onNet(events.PHONE_CALL_SEND_HISTORY, (calls: ICallUI) => {
|
onNet(events.PHONE_CALL_SEND_HISTORY, (calls: ICall) => {
|
||||||
SendNuiMessage(
|
SendNuiMessage(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
app: 'DAILER',
|
app: 'DAILER',
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
useIdentifier,
|
useIdentifier,
|
||||||
} from './functions';
|
} from './functions';
|
||||||
import { XPlayer } from 'esx.js/@types/server';
|
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';
|
import { pool } from './db';
|
||||||
|
|
||||||
@@ -43,11 +43,11 @@ async function updateCall(call: ICall, isAccepted: boolean) {
|
|||||||
await pool.query(query, [isAccepted, call.transmitter]);
|
await pool.query(query, [isAccepted, call.transmitter]);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchCalls(phoneNumber: string): Promise<ICallUI[]> {
|
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 = ?';
|
||||||
const [result] = await pool.query(query, [phoneNumber, phoneNumber]);
|
const [result] = await pool.query(query, [phoneNumber, phoneNumber]);
|
||||||
const calls = <ICallUI[]>result;
|
const calls = <ICall[]>result;
|
||||||
return calls;
|
return calls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user