mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
feat(phone/functions): useIdentifier hook
This commit is contained in:
1 parent
d1d06c47cb
commit
a157ef0baa
1 file changed
+6
@@ -1,4 +1,5 @@
|
||||
import { pool } from './db';
|
||||
import { ESX, getSource } from './server';
|
||||
|
||||
interface IPhoneNumber {
|
||||
phone_number: string;
|
||||
@@ -10,3 +11,8 @@ export async function usePhoneNumber(identifier: string): Promise<string> {
|
||||
const phoneNumber = <IPhoneNumber[]>results;
|
||||
return phoneNumber[0].phone_number;
|
||||
}
|
||||
|
||||
export async function useIdentifier(): Promise<string> {
|
||||
const identifier = await ESX.GetPlayerFromId(getSource()).getIdentifier()
|
||||
return identifier;
|
||||
}
|
||||
Reference in new issue
Block a user