Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 148

Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 266

Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 274
fg
/home2/cargocap/rnm-solutions.com/wp-content/plugins/site-mailer/modules/connect/rest/reconnect.php
<?php

namespace SiteMailer\Modules\Connect\Rest;

use SiteMailer\Modules\Connect\Classes\{
	Route_Base,
	Service,
};

use Throwable;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

/**
 * Class Reconnect
 */
class Reconnect extends Route_Base {
	public string $path = 'reconnect';

	public function get_methods(): array {
		return [ 'POST' ];
	}

	public function get_name(): string {
		return 'reconnect';
	}

	public function POST() {
		try {
			Service::reconnect();
			return $this->respond_success_json();
		} catch ( Throwable $t ) {
			return $this->respond_error_json( [
				'message' => $t->getMessage(),
				'code' => 'internal_server_error',
			] );
		}
	}
}