diff --git a/package.json b/package.json index 47d321f..00221cc 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/users/logout-user.d.ts b/users/logout-user.d.ts index 29ccadd..cafd9e1 100644 --- a/users/logout-user.d.ts +++ b/users/logout-user.d.ts @@ -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"); diff --git a/users/logout-user.js b/users/logout-user.js index ff8ba69..e7efb1b 100644 --- a/users/logout-user.js +++ b/users/logout-user.js @@ -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", }; } }