Fix double call history & adding contact from history (#231)

This commit is contained in:
Dillon Skaggs authored and GitHub committed 2021-05-20 23:54:01 +02:00
1 parent 488c8df5cb
commit 2411c39b95
6 files changed
+12 -6

No files matched your search

+2 -1
View File
@@ -3,13 +3,14 @@ import { mainLogger } from './sv_logger';
import { PhoneEvents } from '../../typings/phone';
import PlayerService from './players/player.service';
import { getSource } from './utils/miscUtils';
import { config } from './server';
interface Credentials {
phone_number: string;
}
async function getCredentials(identifier: string): Promise<string> {
const query = 'SELECT phone_number FROM users WHERE identifier = ?';
const query = `SELECT phone_number FROM ${config.database.playerTable} WHERE ${config.database.identifierColumn} = ?`;
const [result] = await pool.query(query, [identifier]);
const number = <Credentials[]>result;
if (number.length === 0) return '###-####';