api: cleanup controllers

This commit is contained in:
Matthew Penner 2021-03-05 10:03:12 -07:00
parent 00c42225e8
commit f78aaea6a3
47 changed files with 323 additions and 764 deletions

View file

@ -2,6 +2,7 @@
namespace Pterodactyl\Http\Controllers\Api\Application\Roles;
use Illuminate\Http\Response;
use Illuminate\Http\JsonResponse;
use Pterodactyl\Models\AdminRole;
use Pterodactyl\Transformers\Api\Application\AdminRoleTransformer;
@ -82,10 +83,10 @@ class RoleController extends ApplicationApiController
*
* @throws \Exception
*/
public function delete(DeleteRoleRequest $request, AdminRole $role): JsonResponse
public function delete(DeleteRoleRequest $request, AdminRole $role): Response
{
$role->delete();
return new JsonResponse([], JsonResponse::HTTP_NO_CONTENT);
return $this->returnNoContent();
}
}