Refactor: registerUser -> createUser
This commit is contained in:
parent
62edbd9cd2
commit
a34ed38800
@ -85,7 +85,7 @@ export async function getUser(user_id) {
|
||||
* @param {string} password
|
||||
* @returns {Promise<import('$types/status').Success | import('$types/status').Error>}
|
||||
*/
|
||||
export async function registerUser(username, password) {
|
||||
export async function createUser(username, password) {
|
||||
const hashedPassword = await hash(password, {
|
||||
type: argon2id,
|
||||
memoryCost: 2 ** 16,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { registerUser } from '$lib/server/db/user';
|
||||
import { createUser } from '$lib/server/db/user';
|
||||
|
||||
/** @type {import('./$types').PageServerLoad} */
|
||||
export function load({ cookies }) {
|
||||
@ -19,7 +19,7 @@ async function POST({ request }) {
|
||||
return;
|
||||
}
|
||||
|
||||
const result = await registerUser(username, password);
|
||||
const result = await createUser(username, password);
|
||||
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user