Update UserRolesController

This commit is contained in:
Daniel Supernault 2024-01-02 22:06:54 -07:00
parent 75b0f2dda0
commit cbe75ce871
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -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);
}
}