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

umbraco-restapi

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

umbraco-restapi - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

5

client.js

@@ -64,7 +64,2 @@ var Content = require("./content"),

//if (error) {
// return console.log('Access Token Error', error.message);
//}
//create the authentication information

@@ -71,0 +66,0 @@ var auth = oauth2.accessToken.create(result);

24

content.js

@@ -77,13 +77,15 @@ var Ketting = require("ketting");

Content.prototype.query = async function(query) {
var opt = { page: 1, size: 100, query: "" };
if (_.isString(query)) {
opt.query = query;
} else {
_.assign(opt, query);
}
var resource = await this._ketting.follow("query", opt);
var represenation = await resource.representation();
return { representation: represenation, resource: resource };
return await utill.catchException(() => {
var opt = { page: 1, size: 100, query: "" };
if (_.isString(query)) {
opt.query = query;
} else {
_.assign(opt, query);
}
var resource = await this._ketting.follow("query", opt);
var represenation = await resource.representation();
return { representation: represenation, resource: resource };
});
};

@@ -90,0 +92,0 @@

{
"name": "umbraco-restapi",
"version": "1.0.12",
"version": "1.0.13",
"description": "Javascript library for accessing Umbraco website API",

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

var _ = require("lodash");
var catchException = async function( func ){
try{
var response = await func;
return response;
}catch(err){
return {error: err};
}
};
//private function to query children/descendants/ancestors

@@ -60,3 +69,5 @@ var axes = async function(ketting, axes, parent) {

module.exports = {
axes: axes
axes: axes,
relations: relations,
catchException: catchException
};
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