Updates
This commit is contained in:
parent
3b236b2ced
commit
14481494c6
@ -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": {
|
||||
|
4
users/logout-user.d.ts
vendored
4
users/logout-user.d.ts
vendored
@ -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");
|
||||
|
@ -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",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user