This repository has been archived on 2025-12-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
authapp/authserver/services/authService.js
AndrewTrieu c9f31e5c8a First commit
2023-04-21 13:17:50 +03:00

12 lines
343 B
JavaScript

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