MCPcopy Create free account
hub / github.com/Rello/analytics / deleteData

Method deleteData

lib/Controller/DataloadController.php:173–186  ·  view source on GitHub ↗

* delete data from input form * * @param int $reportId * @param $dimension1 * @param $dimension2 * @param bool $isDataset * @return DataResponse|NotFoundResponse */

(int $reportId, $dimension1, $dimension2, bool $isDataset)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

toResponseMethod · 0.80
getHttpStatusMethod · 0.80

Tested by

no test coverage detected