MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / getByEmail

Method getByEmail

lib/models/user.ts:19–27  ·  view source on GitHub ↗
(email: string)

Source from the content-addressed store, hash-verified

17 }
18
19 static async getByEmail(email: string) {
20 const lowercaseEmail = email.toLowerCase().trim();
21
22 const user = (await db.query<User>(sql`SELECT * FROM "bewcloud_users" WHERE "email" = $1 LIMIT 1`, [
23 lowercaseEmail,
24 ]))[0];
25
26 return user;
27 }
28
29 static async getById(id: string) {
30 const user = (await db.query<User>(sql`SELECT * FROM "bewcloud_users" WHERE "id" = $1 LIMIT 1`, [

Callers 7

postFunction · 0.80
postFunction · 0.80
postFunction · 0.80
postFunction · 0.80
postFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected