( req: AxeRequest, fillables: string[], )
| 54 | }; |
| 55 | |
| 56 | export const getMergedFormData = ( |
| 57 | req: AxeRequest, |
| 58 | fillables: string[], |
| 59 | ): Record<string, any> => { |
| 60 | const formData: Record<string, any> = {}; |
| 61 | |
| 62 | Object.keys(req?.body || {}).forEach((key) => { |
| 63 | if (fillables.includes(key)) { |
| 64 | formData[key] = req.body[key]; |
| 65 | } |
| 66 | }); |
| 67 | return formData; |
| 68 | }; |
| 69 | |
| 70 | export const callHooks = async ( |
| 71 | model: IModelService, |
no outgoing calls
no test coverage detected