MCPcopy
hub / github.com/mattkrick/meatier / getUserByEmail

Function getUserByEmail

src/server/graphql/models/User/helpers.js:5–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import crypto from 'crypto';
4
5export const getUserByEmail = async email => {
6 const users = await r.table('users').getAll(email, {index: 'email'}).limit(1).run();
7 return users[0];
8};
9
10export const signJwt = ({id}) => {
11 const secret = process.env.JWT_SECRET || 'topsecret';

Callers 2

resolveFunction · 0.90
resolveFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected