Add lots of things
This commit is contained in:
11
drill-and-practice/services/authService.js
Normal file
11
drill-and-practice/services/authService.js
Normal 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 };
|
||||
Reference in New Issue
Block a user