diff --git a/app/Http/Controllers/UserRolesController.php b/app/Http/Controllers/UserRolesController.php index dbd34d0da..65a71d19d 100644 --- a/app/Http/Controllers/UserRolesController.php +++ b/app/Http/Controllers/UserRolesController.php @@ -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); + } }