Add lots of things

This commit is contained in:
AndrewTrieu
2023-03-09 13:37:03 +02:00
parent 5767d0cfdb
commit 96af150813
10 changed files with 225 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
import { sql } from "../database/database.js";
const findUser = async (email) => {
return await sql`SELECT * FROM users WHERE email = ${email}`;
};
const createUser = async (email, password) => {
return await sql`INSERT INTO users (email, password) VALUES (${email}, ${password})`;
};
export { findUser, createUser };