|
|
@ -1,12 +1,14 @@
|
|
|
|
import { db } from '$lib/db/db';
|
|
|
|
import { db } from '$lib/db/db';
|
|
|
|
|
|
|
|
|
|
|
|
/** What all actions on DB return
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Return of functions that change change DB, either 'success' or 'failure' with explanation
|
|
|
|
* @typedef {Object} DBActionResult
|
|
|
|
* @typedef {Object} DBActionResult
|
|
|
|
* @property {string} [error]
|
|
|
|
* @property {string} [error]
|
|
|
|
* @property {string} [success]
|
|
|
|
* @property {string} [success]
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/** Adds user to the db
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @function addUserToDB Adds user to the db
|
|
|
|
* @param {string} email
|
|
|
|
* @param {string} email
|
|
|
|
* @param {string} passwordHash
|
|
|
|
* @param {string} passwordHash
|
|
|
|
* @param {boolean} isAdmin
|
|
|
|
* @param {boolean} isAdmin
|
|
|
|