Allow downloading CSV by query id and not just query_result id.

This commit is contained in:
Arik Fraimovich
2014-01-04 11:21:52 +02:00
parent 52888c4724
commit b1f9995ce2
2 changed files with 9 additions and 4 deletions

View File

@@ -139,7 +139,7 @@
if ($scope.queryResult.getId() == null) {
$scope.dataUri = "";
} else {
$scope.dataUri = '/api/query_results/' + $scope.queryResult.getId() + '.csv';
$scope.dataUri = '/api/queries/' + $scope.query.id + '/results/' + $scope.queryResult.getId() + '.csv';
$scope.dataFilename = $scope.query.name.replace(" ", "_") + moment($scope.queryResult.getUpdatedAt()).format("_YYYY_MM_DD") + ".csv";
}
});