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

Method updateData

lib/Controller/DataloadController.php:153–166  ·  view source on GitHub ↗

* update data from input form * * @param int $reportId * @param $dimension1 * @param $dimension2 * @param $value * @param bool $isDataset * @return DataResponse|NotFoundResponse * @throws Exception */

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

Source from the content-addressed store, hash-verified

151 * @throws Exception
152 */
153 #[NoAdminRequired]
154 public function updateData(int $reportId, $dimension1, $dimension2, $value, bool $isDataset)
155 {
156 try {
157 $result = $this->DataloadService->updateData($reportId, $dimension1, $dimension2, $value, $isDataset);
158 } catch (FlexibleStorageException $e) {
159 return new DataResponse($e->toResponse(), $e->getHttpStatus());
160 }
161 if ($result) {
162 return new DataResponse($result);
163 } else {
164 return new NotFoundResponse();
165 }
166 }
167
168 /**
169 * delete data from input form

Callers

nothing calls this directly

Calls 2

toResponseMethod · 0.80
getHttpStatusMethod · 0.80

Tested by

no test coverage detected