param; $user = User::findOrFail($param->userId); if ($user->role !== UserRole::SHOP) throw new LogicException(); $this->sessionUser->switch($user); $res = [ 'user_id' => $user->id, 'name' => $user->name, 'role' => $user->role, ]; return $this->successResponse($res); } }