更换model目录
This commit is contained in:
@ -4,8 +4,6 @@
|
||||
namespace App\Http\Controllers\Post;
|
||||
|
||||
use App\Http\Controllers\Base\BaseController;
|
||||
use App\Models\Post\PostModel;
|
||||
use App\Models\Post\PostPushBoxModel;
|
||||
use App\Service\AuthService;
|
||||
|
||||
class PostController extends BaseController
|
||||
@ -29,11 +27,11 @@ class PostController extends BaseController
|
||||
'content',
|
||||
'media',
|
||||
]);
|
||||
if (!in_array($aParams['type'], [PostModel::TYPE_POST, PostModel::TYPE_REPOST])) return $this->error('type params error');
|
||||
if (!in_array($aParams['type'], [\App\Models\Api\Post\PostModel::TYPE_POST, \App\Models\Api\Post\PostModel::TYPE_REPOST])) return $this->error('type params error');
|
||||
|
||||
$oAuthService = new AuthService();
|
||||
$aUser = $oAuthService->getCurrentUser();
|
||||
$oFollowModel = new PostModel();
|
||||
$oFollowModel = new \App\Models\Api\Post\PostModel();
|
||||
$aParams['uid'] = $aUser['id'];
|
||||
|
||||
$oFollowModel->addBatchPost([$aParams]);
|
||||
@ -49,7 +47,7 @@ class PostController extends BaseController
|
||||
]);
|
||||
$oAuthService = new AuthService();
|
||||
$aUser = $oAuthService->getCurrentUser();
|
||||
$oPostModel = new PostPushBoxModel();
|
||||
$oPostModel = new \App\Models\Api\Post\PostPushBoxModel();
|
||||
$aPostList = $oPostModel->getPushBoxList($aUser['id'],$aParams['lastId']??0,$aParams['limit']??15);
|
||||
return $this->success($aPostList);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user