Skip to content

Commit

Permalink
Merge pull request #29 from holidayextras/calling-back
Browse files Browse the repository at this point in the history
Returning the correct callback in populate()
  • Loading branch information
connormeredith committed Jun 7, 2016
2 parents 6e70986 + c0268e6 commit 13b6b15
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- 2016-06-07 - v1.2.1
- 2016-06-07 - Fixing bug in populate()
- 2016-05-31 - v1.2.0
- 2016-05-31 - Use latest `jsonapi-server` processed filter
- 2016-05-13 - v1.1.0
Expand Down
4 changes: 1 addition & 3 deletions lib/sqlHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ SqlStore.prototype.populate = function(callback) {
function(cb) {
async.each(self.resourceConfig.examples, function(exampleJson, ecb) {
var validation = Joi.validate(exampleJson, self.resourceConfig.attributes);
if (validation.error) {
return asyncCallback(validation.error);
}
if (validation.error) return ecb(validation.error);
self.create({ request: { type: self.resourceConfig.resource } }, validation.value, ecb);
}, cb);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsonapi-store-relationaldb",
"version": "1.2.0",
"version": "1.2.1",
"description": "Relational data store for jsonapi-server.",
"keywords": [
"json:api",
Expand Down

0 comments on commit 13b6b15

Please sign in to comment.