* delete data from input form * * @param int $reportId * @param $dimension1 * @param $dimension2 * @param bool $isDataset * @return DataResponse|NotFoundResponse */
(int $reportId, $dimension1, $dimension2, bool $isDataset)
| 175 | * @return DataResponse|NotFoundResponse |
| 176 | */ |
| 177 | #[NoAdminRequired] |
| 178 | public function deleteData(int $reportId, $dimension1, $dimension2, bool $isDataset) |
| 179 | { |
| 180 | try { |
| 181 | $result = $this->DataloadService->deleteData($reportId, $dimension1, $dimension2, $isDataset); |
| 182 | } catch (FlexibleStorageException $e) { |
| 183 | return new DataResponse($e->toResponse(), $e->getHttpStatus()); |
| 184 | } |
| 185 | if ($result) { |
| 186 | return new DataResponse($result); |
| 187 | } else { |
| 188 | return new NotFoundResponse(); |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * Simulate delete data from input form |
nothing calls this directly
no test coverage detected