Update controller/api.php