diff --git a/app/Controller/Api/V1/ContactsApplyController.php b/app/Controller/Api/V1/ContactsApplyController.php index f96618a..54a5dfa 100644 --- a/app/Controller/Api/V1/ContactsApplyController.php +++ b/app/Controller/Api/V1/ContactsApplyController.php @@ -44,9 +44,8 @@ class ContactsApplyController extends CController $params['friend_id'] = (int)$params['friend_id']; $user = $userService->findById($params['friend_id']); - if (!$user) { - return $this->response->fail('用户不存在!'); - } + + if (!$user) return $this->response->fail('用户不存在!'); $user_id = $this->uid(); $key = "{$user_id}_{$params['friend_id']}"; diff --git a/app/Controller/WebSocketController.php b/app/Controller/WebSocketController.php index 38f8dbc..940b8d7 100644 --- a/app/Controller/WebSocketController.php +++ b/app/Controller/WebSocketController.php @@ -24,7 +24,6 @@ use Swoole\Websocket\Frame; use Swoole\Http\Response; use Swoole\WebSocket\Server; use App\Service\SocketClientService; -use App\Model\Group\GroupMember; use App\Event\TalkEvent; diff --git a/app/Traits/PagingTrait.php b/app/Traits/PagingTrait.php index 4e1f7ae..c70c7ac 100644 --- a/app/Traits/PagingTrait.php +++ b/app/Traits/PagingTrait.php @@ -1,4 +1,5 @@