get("Note does not exist", false), "ERROR"); } if (!$note->hasWriteAccess(getRequestUser())) { sendJsonResp($Strings->get("You don't have permission to edit this note.", false), "ERROR"); } $note->deleteNote(); sendJsonResp($Strings->get("Note deleted", false), "OK", ["id" => $note->getID()]);