update types
This commit is contained in:
+1
-9
@@ -19,14 +19,6 @@ const loginLocalUser = require("../engine/user/login-user");
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
|
||||
/**
|
||||
* @typedef {object} AuthenticatedUser
|
||||
* @property {boolean} success - Did the function run successfully?
|
||||
* @property {import("../types/user.td").DATASQUIREL_LoggedInUser | null} payload - Payload of the response
|
||||
* @property {string} [msg] - An optional message
|
||||
* @property {number} [userId] - An optional message
|
||||
*/
|
||||
|
||||
/**
|
||||
* Login A user
|
||||
* ==============================================================================
|
||||
@@ -49,7 +41,7 @@ const loginLocalUser = require("../engine/user/login-user");
|
||||
* @param {string} [params.temp_code_field] - Database table field name for temporary code
|
||||
* @param {boolean} [params.token] - Send access key as part of response body?
|
||||
*
|
||||
* @returns { Promise<AuthenticatedUser>}
|
||||
* @returns { Promise<import("../types/user.td").AuthenticatedUser>}
|
||||
*/
|
||||
async function loginUser({
|
||||
key,
|
||||
|
||||
@@ -20,14 +20,6 @@ const localSendEmailCode = require("../engine/user/send-email-code");
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
|
||||
/**
|
||||
* @typedef {object} AuthenticatedUser
|
||||
* @property {boolean} success - Did the function run successfully?
|
||||
* @property {import("../types/user.td").DATASQUIREL_LoggedInUser | null} payload - Payload of the response
|
||||
* @property {string} [msg] - An optional message
|
||||
* @property {number} [userId] - An optional message
|
||||
*/
|
||||
|
||||
/**
|
||||
* Send Email Code to a User
|
||||
* ==============================================================================
|
||||
|
||||
+1
-8
@@ -16,13 +16,6 @@ const parseCookies = require("../utils/functions/parseCookies");
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
|
||||
/**
|
||||
* @typedef {object} AuthenticatedUserObject
|
||||
* @property {boolean} success - Did the function run successfully?
|
||||
* @property {import("../types/user.td").DATASQUIREL_LoggedInUser | null} payload - Payload
|
||||
* @property {string | unknown} [msg] - Response Message
|
||||
*/
|
||||
|
||||
/**
|
||||
* Authenticate User from request
|
||||
* ==============================================================================
|
||||
@@ -37,7 +30,7 @@ const parseCookies = require("../utils/functions/parseCookies");
|
||||
* @param {string} params.database - Database Name
|
||||
* @param {string} [params.token] - access token to use instead of getting from cookie header
|
||||
*
|
||||
* @returns { AuthenticatedUserObject }
|
||||
* @returns { import("../types/user.td").AuthenticatedUser }
|
||||
*/
|
||||
function userAuth({
|
||||
request,
|
||||
|
||||
Reference in New Issue
Block a user