← All changes
|
public/admin/modules/api/class-portal-api-controller.php
+0
-16
11.0.31
→
11.3.75
View file →
| @@ -15,13 +15,8 @@ | ||
| 15 | 15 | * Class constructor, register route. |
| 16 | 16 | */ |
| 17 | 17 | public function __construct() { |
| 18 | 18 | self::register_leadin_admin_route( |
| 19 | - '/portal', | |
| 20 | - \WP_REST_Server::DELETABLE, | |
| 21 | - array( $this, 'disconnect_portal' ) | |
| 22 | - ); | |
| 23 | - self::register_leadin_admin_route( | |
| 24 | 19 | '/business-unit', |
| 25 | 20 | \WP_REST_Server::READABLE, |
| 26 | 21 | array( $this, 'get_business_unit_option' ) |
| 27 | 22 | ); |
| @@ -29,19 +24,8 @@ | ||
| 29 | 24 | '/business-unit', |
| 30 | 25 | \WP_REST_Server::EDITABLE, |
| 31 | 26 | array( $this, 'set_business_unit_option' ) |
| 32 | 27 | ); |
| 33 | - } | |
| 34 | - | |
| 35 | - /** | |
| 36 | - * Removes portal id and domain from the WordPress options. | |
| 37 | - */ | |
| 38 | - public function disconnect_portal() { | |
| 39 | - if ( Connection::is_connected() ) { | |
| 40 | - Connection::disconnect(); | |
| 41 | - return new \WP_REST_Response( 'OK', 200 ); | |
| 42 | - } | |
| 43 | - return new \WP_REST_Response( 'No leadin_portal_id found, cannot disconnect', 400 ); | |
| 44 | 28 | } |
| 45 | 29 | |
| 46 | 30 | /** |
| 47 | 31 | * Get business unit id option. |