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", "name": "@moduletrace/datasquirel",
"version": "2.8.7", "version": "2.8.8",
"description": "Cloud-based SQL data management tool", "description": "Cloud-based SQL data management tool",
"main": "index.js", "main": "index.js",
"bin": { "bin": {

View File

@ -9,7 +9,7 @@ export = logoutUser;
* @param {string} [params.database] - Target database name(slug): optional * @param {string} [params.database] - Target database name(slug): optional
* @param {string | number} [params.dsqlUserId] * @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, }: { declare function logoutUser({ response, database, dsqlUserId, encryptedUserString, request, }: {
encryptedUserString?: string; encryptedUserString?: string;
@ -23,7 +23,7 @@ declare function logoutUser({ response, database, dsqlUserId, encryptedUserStrin
dsqlUserId?: string | number; dsqlUserId?: string | number;
}): { }): {
success: boolean; success: boolean;
payload: string; msg: string;
cookieNames?: any; cookieNames?: any;
}; };
import http = require("http"); 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} [params.database] - Target database name(slug): optional
* @param {string | number} [params.dsqlUserId] * @param {string | number} [params.dsqlUserId]
* *
* @returns {{success: boolean, payload: string, cookieNames?: any}} * @returns {{success: boolean, msg: string, cookieNames?: any}}
*/ */
function logoutUser({ function logoutUser({
response, response,
@ -86,15 +86,14 @@ function logoutUser({
return { return {
success: true, success: true,
payload: "User Logged Out", msg: "User Logged Out",
cookieNames, cookieNames,
}; };
} catch (error) { } catch (/** @type {any} */ error) {
console.log(error); console.log("Logout Error:", error.message);
return { return {
success: false, success: false,
payload: "Logout Failed", msg: "Logout Failed",
}; };
} }
} }