mirror of
https://github.com/myfatemi04/wheelshare-old-backend.git
synced 2025-04-21 12:10:17 -04:00
get user by email
This commit is contained in:
parent
956ba14e29
commit
01aa0f45d7
|
@ -72,9 +72,11 @@ export function getGroupByID(groupID: string): Carpool.Group | undefined {
|
||||||
export async function getUserByEmail(
|
export async function getUserByEmail(
|
||||||
email: string
|
email: string
|
||||||
): Promise<Carpool.User | undefined> {
|
): Promise<Carpool.User | undefined> {
|
||||||
return ((await UserModel.findOne({
|
return ((
|
||||||
email,
|
await UserModel.findOne({
|
||||||
}).exec()) as unknown) as Carpool.User;
|
email,
|
||||||
|
}).exec()
|
||||||
|
).toJSON() as unknown) as Carpool.User;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function registerUserFromIonProfile(
|
export async function registerUserFromIonProfile(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user