(userId: string)
| 21 | } |
| 22 | |
| 23 | async function lookupUserById(userId: string) { |
| 24 | const [user] = await db |
| 25 | .select({ id: schema.user.id, email: schema.user.email, name: schema.user.name }) |
| 26 | .from(schema.user) |
| 27 | .where(eq(schema.user.id, userId)) |
| 28 | .limit(1) |
| 29 | return user ?? null |
| 30 | } |
| 31 | |
| 32 | async function main() { |
| 33 | const rl = createInterface({ input: process.stdin, output: process.stdout }) |