Small refactor preparing for branch creating/editing. Also closes #58

This commit is contained in:
Cássio Zen
2016-08-29 17:09:04 -03:00
parent 2b70893e89
commit 6eec0feb72
12 changed files with 70 additions and 19 deletions

View File

@ -26,7 +26,7 @@ const entryDraft = (state = Map(), action) => {
return state.set('entry', action.payload);
case ADD_MEDIA:
return state.update('mediaFiles', (list) => list.push(action.payload.path));
return state.update('mediaFiles', (list) => list.push(action.payload.public_path));
case REMOVE_MEDIA:
return state.update('mediaFiles', (list) => list.filterNot((path) => path === action.payload));

View File

@ -5,7 +5,7 @@ import MediaProxy from '../valueObjects/MediaProxy';
const medias = (state = Map(), action) => {
switch (action.type) {
case ADD_MEDIA:
return state.set(action.payload.path, action.payload);
return state.set(action.payload.public_path, action.payload);
case REMOVE_MEDIA:
return state.delete(action.payload);