Skip to content

Commit

Permalink
CBWIRE 4 wip
Browse files Browse the repository at this point in the history
  • Loading branch information
grantcopley committed Apr 25, 2024
1 parent c0ea6f0 commit 2794c59
Show file tree
Hide file tree
Showing 21 changed files with 598 additions and 324 deletions.
18 changes: 12 additions & 6 deletions models/v4/CBWIREController.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ component singleton {
._withEvent( getEvent() )
._withParams( arguments.params )
._withKey( arguments.key )
._withHTTPRequestData( getHTTPRequestData() )
.renderIt();
}

Expand All @@ -40,11 +39,18 @@ component singleton {
comp.snapshot = deserializeJSON( comp.snapshot );
return comp;
} );

return wirebox.getInstance( "CBWIRERequest@cbwire" )
.withPayload( payload )
.withEvent( arguments.event )
.getResponse();
// Iterate over each component in the payload and process it
return {
"components": payload.components.map( ( _componentPayload ) => {
// Locate the component and instantiate it.
var componentInstance = createInstance( _componentPayload.snapshot.memo.name );
// Return the response for this component
return componentInstance
._withEvent( event )
._withIncomingPayload( _componentPayload )
._getHTTPResponse( _componentPayload );
} )
};
}

/**
Expand Down
49 changes: 0 additions & 49 deletions models/v4/CBWIRERequest.cfc

This file was deleted.

Loading

0 comments on commit 2794c59

Please sign in to comment.