Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-Server
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
李帅
2023-02-23 16:39:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9f1265f246512b34c1c4b77e297331ed4f46c01e
9f1265f2
1 parent
486310f5
1.优化接口
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
app/Http/Controllers/V1/ImmerseController.php
app/Http/Controllers/V1/ImmerseController.php
View file @
9f1265f
...
...
@@ -6,9 +6,9 @@ use App\Http\Controllers\Controller;
use
App\Jobs\UserMakeImmerse
;
use
App\Models\Collect
;
use
App\Models\Immerse
;
use
App\Models\UserProfile
;
use
App\Models\Praise
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Log
;
use
Illuminate\Support\Facades\Validator
;
use
Jiannei\Response\Laravel\Support\Facades\Response
;
...
...
@@ -52,6 +52,10 @@ class ImmerseController extends Controller
$validated
=
$validator
->
validated
();
$user_id
=
$request
->
user
()
->
id
;
$user_profile
=
UserProfile
::
query
()
->
where
(
'user_id'
,
$user_id
)
->
first
();
if
(
$user_profile
->
is_vip
==
UserProfile
::
NO_VIP
||
$user_profile
->
video_count
>
5
)
{
return
Response
::
fail
(
"非VIP用户最多发布5个视频"
);
}
$immerse
=
Immerse
::
query
()
->
find
(
$request
->
item_id
);
...
...
Please
register
or
login
to post a comment