feat(calling/client|server): partical functions for calling

Should probably reuse data
This commit is contained in:
Christopher committed 2021-01-17 22:03:52 +01:00
1 parent c12b0ba126
commit 77c7cc303e
8 files changed
+133 -56

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@ interface IPhoneNumber {
phone_number: string;
}
interface Iidentifier {
interface Identifier {
identifier: string;
}
@@ -27,6 +27,6 @@ export async function getIdentifierByPhoneNumber(
): Promise<string> {
const query = 'SELECT identifier FROM users WHERE phone_number = ?';
const [results] = await pool.query(query, [phoneNumber]);
const identifier = <Iidentifier[]>results;
const identifier = <Identifier[]>results;
return identifier[0].identifier;
}