mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Fix double call history & adding contact from history (#231)
This commit is contained in:
1 parent
488c8df5cb
commit
2411c39b95
6 files changed
+12
-6
No files matched your search
@@ -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 '###-####';
|
||||
|
||||
Reference in new issue
Block a user