MCPcopy Create free account
hub / github.com/TheOrcDev/orcish-fullstack-admin / createUser

Function createUser

server/users.ts:65–78  ·  view source on GitHub ↗
(input: CreateUserInput)

Source from the content-addressed store, hash-verified

63}
64
65export async function createUser(input: CreateUserInput) {
66 try {
67 const salt = genSaltSync(10);
68 const hash = hashSync(input.password, salt);
69
70 await db.insert(users).values({
71 username: input.username,
72 email: input.email,
73 password: hash,
74 });
75 } catch (e) {
76 throw e;
77 }
78}

Callers 1

onSubmitFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected