Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media-resource
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨昕
media-resource
Commits
069ed4f3
Commit
069ed4f3
authored
Feb 01, 2021
by
杨昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决getAdmin 获取用户信息失败
parent
bc290ef4
Pipeline
#13680
passed with stages
in 53 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
MemberController.php
app/Http/Controllers/Web/MemberController.php
+3
-3
api.php
routes/api.php
+1
-1
No files found.
app/Http/Controllers/Web/MemberController.php
View file @
069ed4f3
...
...
@@ -25,7 +25,7 @@ class MemberController extends Controller
* users跟新验证
*/
protected
$users_update_verify
=
[
'id'
=>
'required'
,
'
_
id'
=>
'required'
,
'name'
=>
'required'
,
'status'
=>
''
];
...
...
@@ -131,7 +131,7 @@ class MemberController extends Controller
throw
new
\App\Exceptions\FormException
(
'你不能操作别人的'
);
}
if
(
$id
==
getAdmin
()
->
_id
)
{
if
(
$id
==
Auth
::
user
()
->
_id
)
{
throw
new
\App\Exceptions\FormException
(
'你不能操作你自己'
);
}
...
...
@@ -157,7 +157,7 @@ class MemberController extends Controller
throw
new
\App\Exceptions\FormException
(
'你不能操作别人的'
);
}
if
(
$id
==
getAdmin
()
->
_id
)
{
if
(
$id
==
Auth
::
user
()
->
_id
)
{
throw
new
\App\Exceptions\FormException
(
'你不能操作你自己'
);
}
UserModel
::
updateUserStatus
(
$request
);
...
...
routes/api.php
View file @
069ed4f3
...
...
@@ -37,7 +37,7 @@ Route::group(['namespace' => 'Api', 'prefix' => 'v1', 'middleware' => ['auth']],
Route
::
group
([
'namespace'
=>
'Api'
,
'prefix'
=>
'user'
],
function
()
{
Route
::
group
([
'namespace'
=>
'Api'
,
'prefix'
=>
'user'
,
'middleware'
=>
[
'api'
]
],
function
()
{
Route
::
post
(
"media_list"
,
"MediaController@media_list"
);
Route
::
get
(
"play_url/
{
id
}
"
,
"MediaController@play_url"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment