Refactor: registerUser -> createUser

This commit is contained in:
Donatas Kirda 2024-05-16 12:26:27 +03:00
parent 62edbd9cd2
commit a34ed38800
Signed by: bloodwiing
GPG Key ID: 63020D8D3F4A164F
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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);
}