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

tm-authors-api

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tm-authors-api - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

3

config/default.json

@@ -8,6 +8,5 @@ {

"region": "eu-west-1",
"tableName": "AuthorsStateStore-test",
"endpoint": "http://localhost:8000"
"tableName": "AuthorsStateStore-vulcan"
},
"logging": true
}

@@ -10,3 +10,3 @@ {

"name": "presentation",
"image": "trinitymirror/authors-api:2.0.2",
"image": "trinitymirror/authors-api:2.0.4",
"essential": "true",

@@ -13,0 +13,0 @@ "memory": 1700,

{
"name": "tm-authors-api",
"version": "2.0.3",
"version": "2.0.4",
"description": "",

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

@@ -26,3 +26,3 @@ "use strict";

} else {
res.send(result.Item);
res.send(converId(result.Item));
}

@@ -52,3 +52,4 @@ });

} else {
res.send(result.Responses[tableName]);
const response = result.Responses[tableName].map(converId);
res.send(response);
}

@@ -58,1 +59,12 @@ });

};
function converId(item) {
const id = `${item.Source.split("-")[0]}.${item.Id}`;
return R.pipe(
R.assoc("id", id),
R.omit([
"Source",
"Id"
])
)(item);
}

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

.end((err, res) => {
assert.deepEqual(res.body, testAuthor);
assert.deepEqual(res.body.name, 'Jim Author');
assert.deepEqual(res.body.url, 'www.mirror.co.uk/authors/author-jim');
assert.deepEqual(res.body.twitterId, 'a_twitter_id');
assert.deepEqual(res.body.imageUrl, 'www.mirror.co.uk/incoming/article121234.ese/ALTERNATIES/s98/title.png');
assert.deepEqual(res.body.id, 'nationals.123');
done();

@@ -172,2 +176,3 @@ });

assert.equal(res.body.length, 1);
assert.equal(res.body[0].id, "nationals.1234");
assert.equal(res.body[0].url, "www.mirror.co.uk/authors/kimmy-k");

@@ -174,0 +179,0 @@ done();

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