From 8ad85d8209d5d511986b43532ec8b10615bc3fed Mon Sep 17 00:00:00 2001 From: Christopher Date: Sun, 31 Jan 2021 21:43:44 +0100 Subject: [PATCH] feat(calling/client|server): update Call interface --- resources/client/cl_call.ts | 4 ++-- resources/server/sv_call.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/client/cl_call.ts b/resources/client/cl_call.ts index 3883981..7313c88 100644 --- a/resources/client/cl_call.ts +++ b/resources/client/cl_call.ts @@ -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', diff --git a/resources/server/sv_call.ts b/resources/server/sv_call.ts index bcc86ad..25db01e 100644 --- a/resources/server/sv_call.ts +++ b/resources/server/sv_call.ts @@ -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 { +async function fetchCalls(phoneNumber: string): Promise { const query = 'SELECT * FROM npwd_calls WHERE receiver = ? OR transmitter = ?'; const [result] = await pool.query(query, [phoneNumber, phoneNumber]); - const calls = result; + const calls = result; return calls; }