Skip to content

Commit

Permalink
More lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Jan 9, 2024
1 parent 5615d0d commit c4f6307
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 10 additions & 8 deletions includes/RestApi/FlowController.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,12 @@ public function save_onboarding_flow_data( \WP_REST_Request $request ) {
/**
* Flow completion API for child theme generation, verify child theme and publish site pages.
*
* @param \WP_REST_Request $request The incoming request.
*
* @return \WP_REST_Response|\WP_Error
*/
public function complete( $request ) {
$flow = $request->get_param('flow');
$flow = $request->get_param( 'flow' );
if ( 'sitegen' === $flow ) {
$flow_data_option = \get_option( Options::get_option_name( 'flow' ), false );
if ( false === $flow_data_option || ! isset( $flow_data_option['data'] ) ) {
Expand All @@ -140,13 +142,13 @@ public function complete( $request ) {
array( 'status' => 500 )
);
}
$homepage_data = $flow_data_option['sitegen']['homepages']['data'];
$active_homepage = $flow_data_option['sitegen']['homepages']['active'];
SiteGenService::complete( $active_homepage, $homepage_data );
return new \WP_REST_Response(
array(),
201
);
$homepage_data = $flow_data_option['sitegen']['homepages']['data'];
$active_homepage = $flow_data_option['sitegen']['homepages']['active'];
SiteGenService::complete( $active_homepage, $homepage_data );
return new \WP_REST_Response(
array(),
201
);
}

$site_pages_publish_request = new \WP_REST_Request(
Expand Down
1 change: 0 additions & 1 deletion includes/RestApi/SiteGenController.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,5 @@ public function generate_sitegen_meta( \WP_REST_Request $request ) {

// TODO Implement the main function and do computations if required.
return SiteGenService::instantiate_site_meta( $site_info, $identifier, $skip_cache );

}
}

0 comments on commit c4f6307

Please sign in to comment.