feat(calling/client|server): update Call interface

This commit is contained in:
Christopher committed 2021-01-31 21:43:44 +01:00
1 parent 04afb24bda
commit 8ad85d8209
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
import { ESX } from './client';
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 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(
JSON.stringify({
app: 'DAILER',
+3 -3
View File
@@ -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;
}