This commit is contained in:
Benjamin Toby 2024-12-10 19:14:00 +01:00
parent 3b236b2ced
commit 14481494c6
3 changed files with 8 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@moduletrace/datasquirel",
"version": "2.8.7",
"version": "2.8.8",
"description": "Cloud-based SQL data management tool",
"main": "index.js",
"bin": {

View File

@ -9,7 +9,7 @@ export = logoutUser;
* @param {string} [params.database] - Target database name(slug): optional
* @param {string | number} [params.dsqlUserId]
*
* @returns {{success: boolean, payload: string, cookieNames?: any}}
* @returns {{success: boolean, msg: string, cookieNames?: any}}
*/
declare function logoutUser({ response, database, dsqlUserId, encryptedUserString, request, }: {
encryptedUserString?: string;
@ -23,7 +23,7 @@ declare function logoutUser({ response, database, dsqlUserId, encryptedUserStrin
dsqlUserId?: string | number;
}): {
success: boolean;
payload: string;
msg: string;
cookieNames?: any;
};
import http = require("http");

View File

@ -19,7 +19,7 @@ const parseCookies = require("../package-shared/utils/backend/parseCookies");
* @param {string} [params.database] - Target database name(slug): optional
* @param {string | number} [params.dsqlUserId]
*
* @returns {{success: boolean, payload: string, cookieNames?: any}}
* @returns {{success: boolean, msg: string, cookieNames?: any}}
*/
function logoutUser({
response,
@ -86,15 +86,14 @@ function logoutUser({
return {
success: true,
payload: "User Logged Out",
msg: "User Logged Out",
cookieNames,
};
} catch (error) {
console.log(error);
} catch (/** @type {any} */ error) {
console.log("Logout Error:", error.message);
return {
success: false,
payload: "Logout Failed",
msg: "Logout Failed",
};
}
}