```php
<?php

require_once '../../core/api_bootstrap.php';
require_once '../../core/employee_auth.php';

EmployeeAuth::check('manage_roles');

$data = Request::post();

try{

Validator::required($data,['id']);

$db = new Database();
$conn = $db->connect();

$conn->prepare("

DELETE FROM role_permissions
WHERE role_id=:id

")->execute([
':id'=>$data['id']
]);

$conn->prepare("

DELETE FROM roles
WHERE id=:id

")->execute([
':id'=>$data['id']
]);

Response::success([],"Role deleted");

}
catch(Exception $e){

Logger::log("system.log",$e->getMessage());

Response::error("Server error",500);

}