Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

errsole-sequelize

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

errsole-sequelize - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

17

lib/index.js

@@ -194,3 +194,3 @@ const { Sequelize, DataTypes } = require('sequelize');

async updateUserprofile (email, updates) {
async updateUserProfile (email, updates) {
if (!email) {

@@ -204,10 +204,15 @@ return { status: false, error: 'Email is required' };

delete updates.id;
try {
const [updatedCount] = await this.errsoleUsers.update(updates, { where: { email } });
if (updatedCount === 0) {
return { status: false, error: 'User not found or no updates applied' };
const user = await this.errsoleUsers.findOne({ where: { email } });
if (!user) {
return { status: false, error: 'User not found' };
}
const [updateCount] = await this.errsoleUsers.update(updates, {
where: { email }
});
if (updateCount === 0) {
return { status: false, error: 'User update failed' };
}
return { status: true, message: 'User profile updated successfully' };
return { status: true, message: 'User updated successfully' };
} catch (error) {

@@ -214,0 +219,0 @@ return { status: false, error: error.message };

{
"name": "errsole-sequelize",
"version": "0.0.1",
"version": "1.0.0",
"description": "A Sequelize logging module for Node.js applications that automatically captures all logs.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc