更换model目录
This commit is contained in:
@ -6,7 +6,7 @@ use App\Const\Im;
|
||||
use App\Const\VrCode;
|
||||
use App\Exceptions\AppException;
|
||||
use App\Http\Controllers\Base\CustomerBaseController;
|
||||
use App\Models\Customer\CustomerUserModel;
|
||||
use App\Models\Api\Customer\CustomerUserModel;
|
||||
use App\Service\AuthService;
|
||||
use App\Service\ImService;
|
||||
use App\Service\VrCodeService;
|
||||
|
||||
@ -5,8 +5,7 @@ namespace App\Http\Controllers\Follow;
|
||||
|
||||
use App\Exceptions\ModelException;
|
||||
use App\Http\Controllers\Base\BaseController;
|
||||
use App\Models\Follow\FollowHistoryModel;
|
||||
use App\Models\Follow\FollowModel;
|
||||
use App\Models\Api\Follow\FollowModel;
|
||||
use App\Service\AuthService;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ namespace App\Http\Controllers\Sms;
|
||||
use App\Const\VrCode;
|
||||
use App\Exceptions\AppException;
|
||||
use App\Http\Controllers\Base\CustomerBaseController;
|
||||
use App\Models\Customer\CustomerUserModel;
|
||||
use App\Models\Api\Customer\CustomerUserModel;
|
||||
use App\Service\AuthService;
|
||||
use App\Service\VrCodeService;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
@ -3,11 +3,10 @@
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Const\Responses;
|
||||
use App\Models\Customer\CustomerUserModel;
|
||||
use App\Models\Api\Customer\CustomerUserModel;
|
||||
use App\Service\AuthService;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class AuthMiddleware
|
||||
|
||||
Reference in New Issue
Block a user