MCPcopy Create free account
hub / github.com/axe-api/axe-api / getMergedFormData

Function getMergedFormData

packages/axe-api/src/Handlers/Helpers.ts:56–68  ·  view source on GitHub ↗
(
  req: AxeRequest,
  fillables: string[],
)

Source from the content-addressed store, hash-verified

54};
55
56export 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
70export const callHooks = async (
71 model: IModelService,

Callers 3

PreparePhase.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected