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