upload, parse and store door lock entries
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
const initialState = {
|
||||
pending: false,
|
||||
result: {},
|
||||
error: '',
|
||||
error: null,
|
||||
};
|
||||
|
||||
export const doorLockData = (state, action) => {
|
||||
@@ -18,15 +18,18 @@ export const doorLockData = (state, action) => {
|
||||
case UPLOAD_DOOR_LOCK_DATA_PENDING:
|
||||
return Object.assign({}, state, {
|
||||
pending: true,
|
||||
error: null,
|
||||
});
|
||||
case UPLOAD_DOOR_LOCK_DATA_SUCCESS:
|
||||
return Object.assign({}, state, {
|
||||
pending: false,
|
||||
result: action.payload,
|
||||
error: null,
|
||||
});
|
||||
case UPLOAD_DOOR_LOCK_DATA_FAILED:
|
||||
return Object.assign({}, state, {
|
||||
pending: false,
|
||||
result: {},
|
||||
error: action.payload,
|
||||
});
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user