set defaults on fetchAssets

This commit is contained in:
Riley Davis
2016-12-21 16:39:29 -07:00
parent c867ae8eeb
commit 7cbd06834f
+2 -2
View File
@@ -14,9 +14,9 @@ import coralApi from '../../../coral-framework/helpers/response';
// Fetch a page of assets
// Get comments to fill each of the three lists on the mod queue
export const fetchAssets = (skip, limit, search, sort, filter) => (dispatch) => {
export const fetchAssets = (skip = '', limit = '', search = '', sort = '', filter = '') => (dispatch) => {
dispatch({type: FETCH_ASSETS});
return coralApi(`/assets?skip=${skip || ''}&limit=${limit || ''}&sort=${sort || ''}&search=${search || ''}&filter=${filter || ''}`)
return coralApi(`/assets?skip=${skip}&limit=${limit}&sort=${sort}&search=${search}&filter=${filter}`)
.then(({result, count}) =>
dispatch({type: FETCH_ASSETS_SUCCESS,
assets: result,