fix(resources/calls): invalid sql syntax

This commit is contained in:
Taso committed 2021-02-06 19:56:48 -05:00
1 parent 892acd2f59
commit f626d1b0ce
1 file changed
+3 -3
+3 -3
View File
@@ -41,9 +41,9 @@ async function saveCall(call: ICall) {
await pool.query(query, [call.transmitter, call.receiver, call.start]);
}
async function updateCall(call: ICall, isAccepted: boolean, end?: number) {
async function updateCall(call: ICall, isAccepted: boolean, end: number) {
const query =
'UPDATE npwd_calls SET is_accepted, end (?, ?) WHERE identifier = ?';
'UPDATE npwd_calls SET is_accepted=?, end=? WHERE identifier = ?';
await pool.query(query, [isAccepted, end, call.identifier]);
}
@@ -115,7 +115,7 @@ onNet(events.PHONE_ACCEPT_CALL, async (transmitterNumber: string) => {
const currentCall = calls.get(transmitterNumber);
const channelId = pSource;
await updateCall(currentCall, true);
await updateCall(currentCall, true, null);
// player who is being called
emitNet(