diff --git a/dataCollector/dataCollector.php b/dataCollector/dataCollector.php
index 566417b..26c3c12 100644
--- a/dataCollector/dataCollector.php
+++ b/dataCollector/dataCollector.php
@@ -25,7 +25,7 @@ function findRowIndex($id, $data) {
}
$entityBody = '{"lastSave": 0, "timeWatchM": 0, "timeWatchW": 0, "timeWatchD": 0, "countWatchM": 0, "countWatchW": 0, "countWatchD": 0, "id":"test","watches":[{"actions":[]},{"actions":[]},{"actions":[]}]}';
-if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$entityBody = file_get_contents('php://input');
$entityBodyObject = json_decode($entityBody);
@@ -46,6 +46,8 @@ if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
write_xlsxFile($fileName, $data);
echo "
Data saved.
";
}
+} else {
+ echo "invalid Request.
Type: ".$_SERVER['REQUEST_METHOD'];
}