mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 04:53:17 +00:00
Update UserRolesController
This commit is contained in:
parent
75b0f2dda0
commit
cbe75ce871
1 changed files with 14 additions and 1 deletions
|
@ -3,8 +3,21 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\UserRoleService;
|
||||
|
||||
class UserRolesController extends Controller
|
||||
{
|
||||
//
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
public function getRoles(Request $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
'id' => 'required'
|
||||
]);
|
||||
|
||||
return UserRoleService::getRoles($request->user()->id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue