refactor(pipedrive): make filterProvidedFields func reusable
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
import defineAction from '../../../../helpers/define-action';
|
||||
|
||||
function filterProvidedFields(body: Record<string, unknown>) {
|
||||
return Object.keys(body).reduce<Record<string, unknown>>((result, key) => {
|
||||
if (body[key]) {
|
||||
result[key] = body[key];
|
||||
}
|
||||
return result;
|
||||
}, {});
|
||||
}
|
||||
import { filterProvidedFields } from '../../common/filter-provided-fields';
|
||||
|
||||
export default defineAction({
|
||||
name: 'Create organization',
|
||||
|
Reference in New Issue
Block a user