refactor(server/source-handling): Altered how we handle source

These changes are made in case source is not guranteed to remain the same

Due to how JS should operate, this shouldn't be an issue but this just ensures that
This commit is contained in:
Taso committed 2021-02-14 20:17:41 -05:00
1 parent acb8e056c3
commit 1aa6a383ab
12 files changed
+222 -140

No files matched your search

+3 -3
View File
@@ -16,10 +16,10 @@ export async function usePhoneNumber(identifier: string): Promise<string> {
return phoneNumber[0].phone_number;
}
export const getSource = () => parseInt(source);
export const getSource = () => (global as any).source;
export async function useIdentifier(): Promise<string> {
return ESX.GetPlayerFromId(getSource()).getIdentifier();
export function getIdentifier(source: number): string {
return ESX.GetPlayerFromId(source).getIdentifier();
}
export async function getIdentifierByPhoneNumber(