From 91e8fdb99e321496c54288fe5a3db6397c768c10 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 11 Jul 2020 00:50:00 +0200 Subject: building basic site. need to include cursors, etc --- frontend/api/crud.types.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'frontend/api/crud.types.js') diff --git a/frontend/api/crud.types.js b/frontend/api/crud.types.js index 7a64f5c..7b24811 100644 --- a/frontend/api/crud.types.js +++ b/frontend/api/crud.types.js @@ -1,7 +1,7 @@ export const as_type = (a, b) => [a, b].join('_').toUpperCase() -export const with_type = (type, actions) => +export const with_type = (type, actions) => actions.reduce((a, b) => (a[b] = as_type(type, b)) && a, {}) export const crud_type = (type, actions=[]) => -- cgit v1.2.3-70-g09d2