(pointerNames)
| 940 | }); |
| 941 | |
| 942 | function buildCLP(pointerNames) { |
| 943 | const OPERATIONS = ['count', 'find', 'get', 'create', 'update', 'delete', 'addField']; |
| 944 | |
| 945 | const clp = OPERATIONS.reduce((acc, op) => { |
| 946 | acc[op] = {}; |
| 947 | |
| 948 | if (pointerNames && pointerNames.length) { |
| 949 | acc[op].pointerFields = pointerNames; |
| 950 | } |
| 951 | |
| 952 | return acc; |
| 953 | }, {}); |
| 954 | |
| 955 | clp.protectedFields = {}; |
| 956 | clp.writeUserFields = []; |
| 957 | clp.readUserFields = []; |
| 958 | |
| 959 | return clp; |
| 960 | } |
| 961 | |
| 962 | function createUserPointer(userId) { |
| 963 | return { |
no outgoing calls
no test coverage detected