Comparing version 0.0.3 to 0.0.4
@@ -169,3 +169,3 @@ 'use strict'; | ||
}).catch(function (body) { | ||
if (optimistic) _this2.collection.add([_this2]); | ||
if (optimistic) _this2.collection.add([_this2.attributes]); | ||
_this2.error = { label: label, body: body }; | ||
@@ -172,0 +172,0 @@ _this2.request = null; |
{ | ||
"name": "mobx-rest", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "REST conventions for mobx.", | ||
@@ -41,7 +41,7 @@ "repository": { | ||
"prepublish": "npm run compile", | ||
"test": "./node_modules/mocha/bin/mocha test/* --require babel-core/register", | ||
"unit": "./node_modules/mocha/bin/mocha test/* --require babel-core/register", | ||
"lint": "standard --verbose | snazzy", | ||
"flow": "flow", | ||
"check": "npm run flow && npm run link && npm test" | ||
"test": "npm run flow && npm run lint && npm run unit" | ||
} | ||
} |
@@ -24,4 +24,9 @@ # REST Mobx | ||
class Tasks extends Collection { | ||
basePath () { `${apiPath}/tasks` } | ||
model () { Task } | ||
basePath () { | ||
return `${apiPath}/tasks` | ||
} | ||
model () { | ||
return Task | ||
} | ||
} | ||
@@ -28,0 +33,0 @@ |
@@ -193,2 +193,3 @@ /*global describe, it, context, beforeEach*/ | ||
assert.equal(collection.models.length, 1) | ||
assert.equal(collection.at(0).get('name'), item.name) | ||
}) | ||
@@ -195,0 +196,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37408
879
96