updates
This commit is contained in:
+4
-2
@@ -38,7 +38,7 @@ const https = require("https");
|
||||
*
|
||||
* @returns { Promise<FunctionReturn> }
|
||||
*/
|
||||
module.exports = async function ({ key, payload, database }) {
|
||||
async function addUser({ key, payload, database }) {
|
||||
/**
|
||||
* Make https request
|
||||
*
|
||||
@@ -93,8 +93,10 @@ module.exports = async function ({ key, payload, database }) {
|
||||
/** ********************************************** */
|
||||
|
||||
return httpResponse;
|
||||
};
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
|
||||
module.exports = addUser;
|
||||
|
||||
+4
-3
@@ -4,7 +4,6 @@
|
||||
* ==============================================================================
|
||||
*/
|
||||
const https = require("https");
|
||||
const encrypt = require("../functions/encrypt");
|
||||
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
@@ -44,7 +43,7 @@ const encrypt = require("../functions/encrypt");
|
||||
*
|
||||
* @returns { Promise<FunctionReturn>}
|
||||
*/
|
||||
module.exports = async function ({ key, userId, database, fields }) {
|
||||
async function getUser({ key, userId, database, fields }) {
|
||||
/**
|
||||
* Make https request
|
||||
*
|
||||
@@ -105,8 +104,10 @@ module.exports = async function ({ key, userId, database, fields }) {
|
||||
/** ********************************************** */
|
||||
|
||||
return httpResponse;
|
||||
};
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
|
||||
module.exports = getUser;
|
||||
|
||||
+4
-2
@@ -55,7 +55,7 @@ const encrypt = require("../functions/encrypt");
|
||||
*
|
||||
* @returns { Promise<FunctionReturn>}
|
||||
*/
|
||||
module.exports = async function ({ key, payload, database, response, encryptionKey, encryptionSalt }) {
|
||||
async function loginUser({ key, payload, database, response, encryptionKey, encryptionSalt }) {
|
||||
/**
|
||||
* Check Encryption Keys
|
||||
*
|
||||
@@ -170,8 +170,10 @@ module.exports = async function ({ key, payload, database, response, encryptionK
|
||||
/** ********************************************** */
|
||||
|
||||
return httpResponse;
|
||||
};
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
|
||||
module.exports = loginUser;
|
||||
|
||||
@@ -12,7 +12,7 @@ const parseCookies = require("../utils/functions/parseCookies");
|
||||
*
|
||||
* @returns {{success: boolean, payload: string}}
|
||||
*/
|
||||
module.exports = function ({ request, response, database }) {
|
||||
function logoutUser({ request, response, database }) {
|
||||
/**
|
||||
* Check Encryption Keys
|
||||
*
|
||||
@@ -62,8 +62,10 @@ module.exports = function ({ request, response, database }) {
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
};
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
|
||||
module.exports = logoutUser;
|
||||
|
||||
@@ -57,7 +57,7 @@ const userAuth = require("./user-auth");
|
||||
*
|
||||
* @returns { Promise<FunctionReturn> }
|
||||
*/
|
||||
module.exports = async function ({ key, database, response, request, level, encryptionKey, encryptionSalt }) {
|
||||
async function reauthUser({ key, database, response, request, level, encryptionKey, encryptionSalt }) {
|
||||
/**
|
||||
* Check Encryption Keys
|
||||
*
|
||||
@@ -158,8 +158,10 @@ module.exports = async function ({ key, database, response, request, level, encr
|
||||
/** ********************************************** */
|
||||
|
||||
return httpResponse;
|
||||
};
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
|
||||
module.exports = reauthUser;
|
||||
|
||||
@@ -37,7 +37,7 @@ const encrypt = require("../../functions/encrypt");
|
||||
*
|
||||
* @returns { Promise<FunctionReturn> }
|
||||
*/
|
||||
module.exports = async function ({ key, token, database, clientId, response, encryptionKey, encryptionSalt }) {
|
||||
async function googleAuth({ key, token, database, clientId, response, encryptionKey, encryptionSalt }) {
|
||||
/**
|
||||
* Check inputs
|
||||
*
|
||||
@@ -183,8 +183,10 @@ module.exports = async function ({ key, token, database, clientId, response, enc
|
||||
////////////////////////////////////////
|
||||
|
||||
return httpResponse;
|
||||
};
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
////////////////////////////////////////
|
||||
////////////////////////////////////////
|
||||
|
||||
module.exports = googleAuth;
|
||||
|
||||
@@ -31,7 +31,7 @@ const https = require("https");
|
||||
*
|
||||
* @returns { Promise<FunctionReturn>}
|
||||
*/
|
||||
module.exports = async function ({ key, payload, database }) {
|
||||
async function updateUser({ key, payload, database }) {
|
||||
/**
|
||||
* Make https request
|
||||
*
|
||||
@@ -86,8 +86,10 @@ module.exports = async function ({ key, payload, database }) {
|
||||
/** ********************************************** */
|
||||
|
||||
return httpResponse;
|
||||
};
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
|
||||
module.exports = updateUser;
|
||||
|
||||
+4
-2
@@ -50,7 +50,7 @@ const parseCookies = require("../utils/functions/parseCookies");
|
||||
*
|
||||
* @returns { FunctionReturn }
|
||||
*/
|
||||
module.exports = function ({ request, encryptionKey, encryptionSalt, level, database }) {
|
||||
function userAuth({ request, encryptionKey, encryptionSalt, level, database }) {
|
||||
try {
|
||||
/**
|
||||
* Grab the payload
|
||||
@@ -146,8 +146,10 @@ module.exports = function ({ request, encryptionKey, encryptionSalt, level, data
|
||||
msg: error.message,
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
|
||||
module.exports = userAuth;
|
||||
|
||||
Reference in New Issue
Block a user