pixelfed/app/Http/Controllers/UserRolesController.php

24 lines
438 B
PHP
Raw Permalink Normal View History

2023-12-27 09:51:47 +00:00
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
2024-01-03 05:06:54 +00:00
use App\Services\UserRoleService;
2023-12-27 09:51:47 +00:00
class UserRolesController extends Controller
{
2024-01-03 05:06:54 +00:00
public function __construct()
{
$this->middleware('auth');
}
public function getRoles(Request $request)
{
$this->validate($request, [
'id' => 'required'
]);
return UserRoleService::getRoles($request->user()->id);
}
2023-12-27 09:51:47 +00:00
}