29 lines
590 B
PHP
29 lines
590 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Controllers;
|
||
|
|
|
||
|
|
use App\Services\GatewayWorker\ImService;
|
||
|
|
use App\Services\GatewayWorker\UserService;
|
||
|
|
use Illuminate\Http\Request;
|
||
|
|
|
||
|
|
class ImController extends Controller
|
||
|
|
{
|
||
|
|
//
|
||
|
|
private $service;
|
||
|
|
|
||
|
|
public function __construct()
|
||
|
|
{
|
||
|
|
$this->service = ImService::getInstance();
|
||
|
|
}
|
||
|
|
public function bind()
|
||
|
|
{
|
||
|
|
$clientId = request()->input('client_id');
|
||
|
|
|
||
|
|
try {
|
||
|
|
return jok($this->service->bindClientIdByUserId($clientId));
|
||
|
|
} catch (\Exception $e) {
|
||
|
|
return jerr($e->getMessage());
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|