New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@spinajs/orm-http

Package Overview
Dependencies
Maintainers
1
Versions
344
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/orm-http - npm Package Compare versions

Comparing version 1.2.199 to 1.2.201

20

lib/controllers/JsonApi.js

@@ -221,7 +221,3 @@ "use strict";

if (incoming.data.attributes) {
const columns = Object.keys(incoming.data.attributes).filter((x) => model.Descriptor.Columns.find((c) => c.Name === x));
// create query, so we can pass to middleware
const query = model.UpdateQueryBuilder.update(lodash_1.default.pick(incoming.data.attributes, columns)).where(entity.PrimaryKeyName, entity.PrimaryKeyValue);
this.Middlewares.forEach((m) => m.onUpdateMiddlewareQuery(entity.PrimaryKeyValue, query, model.Type, req));
await query;
await entity.hydrate(incoming.data.attributes);
}

@@ -239,15 +235,3 @@ await this.updateRelations(incoming, model, entity);

entity.hydrate(incoming.data.attributes);
let pKey = null;
const iMidleware = {
afterQuery: (data) => {
pKey = data.LastInsertId;
return data;
},
modelCreation: () => null,
afterHydration: () => null,
};
const query = model.InserQuery.middleware(iMidleware).values(entity.dehydrate());
this.Middlewares.forEach((m) => m.onInsertMiddlewareQuery(query, model.Type, req));
await query;
entity.PrimaryKeyValue = pKey;
await entity.insert();
await this.updateRelations(incoming, model, entity);

@@ -254,0 +238,0 @@ let jResult = modelToJsonApi(entity);

4

package.json
{
"name": "@spinajs/orm-http",
"version": "1.2.199",
"version": "1.2.201",
"description": "Orm extensions for HTTP module",

@@ -57,3 +57,3 @@ "main": "lib/index.js",

},
"gitHead": "8866c45ad5b51b5c430fd69bb85ba0956b61b9b1"
"gitHead": "e5e624508d73fb8c63eabb9d150c64e5fba2a17f"
}

Sorry, the diff of this file is not supported yet

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