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

Method updateData

lib/Controller/DataloadController.php:149–162  ·  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

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

Callers

nothing calls this directly

Calls 2

toResponseMethod · 0.80
getHttpStatusMethod · 0.80

Tested by

no test coverage detected