|
|
@@ -3,10 +3,7 @@
|
|
|
namespace App\Http\Controllers\Api\v1;
|
|
|
|
|
|
use App\Http\Controllers\Api\BaseController;
|
|
|
-use App\Http\Validator\ArticleValidator;
|
|
|
-use App\Services\ArticleBooksService;
|
|
|
-use App\Services\ArticleService;
|
|
|
-use App\Services\ConfigService;
|
|
|
+use App\Services\CollectService;
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
/**
|
|
|
@@ -28,7 +25,7 @@ class CollectController extends BaseController
|
|
|
{
|
|
|
parent::__construct();
|
|
|
|
|
|
- $this->service = new ArticleService();
|
|
|
+ $this->service = new CollectService();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -39,4 +36,12 @@ class CollectController extends BaseController
|
|
|
$params = request()->all();
|
|
|
return $this->service->getDataList($params);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 收藏
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function collect(){
|
|
|
+ return $this->service->collect($this->userId);
|
|
|
+ }
|
|
|
}
|