mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 22:17:39 +00:00
12 lines
374 B
TypeScript
12 lines
374 B
TypeScript
import { pool } from './db';
|
|
|
|
interface IPhoneNumber {
|
|
phone_number: string;
|
|
}
|
|
|
|
export async function usePhoneNumber(identifier: string): Promise<string> {
|
|
const query = "SELECT phone_number FROM users WHERE identifier = ?"
|
|
const [results] = await pool.query(query, [identifier]);
|
|
const phoneNumber = <IPhoneNumber[]>results;
|
|
return phoneNumber[0].phone_number;
|
|
} |