@app-masters/sync-cache
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -9,3 +9,3 @@ # Changelog | ||
## [0.0.1/0.0.4] - 2018-10-16 | ||
## [0.0.1/0.0.6] - 2018-10-16 | ||
### Added | ||
@@ -16,1 +16,2 @@ - Sync-Cache creation | ||
- Warning instead of Error on uncaught | ||
- SAVE_ACTION Action on Success |
@@ -73,3 +73,6 @@ 'use strict'; | ||
onlineMethod: this.createOnline.bind(this), | ||
reduxMethod: this.setCreateObject.bind(this), | ||
reduxMethod: (dispatch, object) => { | ||
this.setCreateObject(dispatch, object); | ||
this.setSaveObject(dispatch, object); | ||
}, | ||
syncMethod: this.setObjectCreated.bind(this) | ||
@@ -81,3 +84,6 @@ }; | ||
onlineMethod: this.updateOnline.bind(this), | ||
reduxMethod: this.setUpdateObject.bind(this), | ||
reduxMethod: (dispatch, object) => { | ||
this.setUpdateObject(dispatch, object); | ||
this.setSaveObject(dispatch, object); | ||
}, | ||
syncMethod: this.setObjectUpdated.bind(this) | ||
@@ -742,2 +748,12 @@ }; | ||
/** | ||
* Dispatch Redux thunk actions SAVE_OBJECT with the value of object as payload | ||
* This action is used for create and update | ||
* @param dispatch | ||
* @param object | ||
*/ | ||
setSaveObject(dispatch, object) { | ||
dispatch({ type: this.type('SAVE_OBJECT'), payload: object }); | ||
} | ||
/** | ||
* Dispatch Redux thunk actions GET_OBJECT with the value of object as payload | ||
@@ -744,0 +760,0 @@ * @param dispatch |
{ | ||
"name": "@app-masters/sync-cache", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
49993
1132