15 lines
312 B
JavaScript
15 lines
312 B
JavaScript
/** @format */
|
|
|
|
const updateSettings = operations => settingFields => {
|
|
const resourceKey = 'settings';
|
|
Object.keys( settingFields ).map( group =>
|
|
operations.update( [ resourceKey + '/' + group ], {
|
|
[ resourceKey + '/' + group ]: settingFields[ group ],
|
|
} )
|
|
);
|
|
};
|
|
|
|
export default {
|
|
updateSettings,
|
|
};
|