← All changes
|
modules/design-system-sync/classes/controller.php
+0
-5
4.1.0-dev2
→
4.0.0-dev4
View file →
| @@ -13,9 +13,8 @@ | ||
| 13 | 13 | class Controller { |
| 14 | 14 | const API_NAMESPACE = 'elementor/v1'; |
| 15 | 15 | const API_BASE = 'design-system-sync'; |
| 16 | 16 | const HTTP_CREATED = 201; |
| 17 | - const HTTP_NO_CONTENT = 204; | |
| 18 | 17 | const HTTP_INTERNAL_SERVER_ERROR = 500; |
| 19 | 18 | |
| 20 | 19 | public function register_hooks() { |
| 21 | 20 | add_action( 'rest_api_init', [ $this, 'register_routes' ] ); |
| @@ -32,12 +31,8 @@ | ||
| 32 | 31 | public function generate(): WP_REST_Response { |
| 33 | 32 | try { |
| 34 | 33 | $stylesheet = new Stylesheet_Manager(); |
| 35 | 34 | $result = $stylesheet->generate(); |
| 36 | - | |
| 37 | - if ( null === $result ) { | |
| 38 | - return new WP_REST_Response( null, self::HTTP_NO_CONTENT ); | |
| 39 | - } | |
| 40 | 35 | |
| 41 | 36 | return new WP_REST_Response( $result, self::HTTP_CREATED ); |
| 42 | 37 | } catch ( Exception $e ) { |
| 43 | 38 | return new WP_REST_Response( |