andre 7 mesi fa
parent
commit
043dd86164
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      index.php

+ 6 - 0
index.php

@@ -91,12 +91,18 @@ switch ($endpoint) {
                 error_log("POST: " . print_r($_POST, true));
                 error_log("POST: " . print_r($_POST, true));
             }
             }
             SiteController::deploy(['zip' => $_POST['zip'], 'username' => $username, 'domain' => $domain]);
             SiteController::deploy(['zip' => $_POST['zip'], 'username' => $username, 'domain' => $domain]);
+            header('Content-Type: application/json; charset=utf-8', true);
+	        echo json_encode(array('result' => array('id' => 'test123', 'error' => null)));
+	        exit();
         }
         }
         if ($requestMethod === 'GET' && !empty($username) && !empty($domain)) {
         if ($requestMethod === 'GET' && !empty($username) && !empty($domain)) {
             if ($GLOBALS['debug'] == true) {
             if ($GLOBALS['debug'] == true) {
                 error_log("GET: " . print_r($_GET, true));
                 error_log("GET: " . print_r($_GET, true));
             }
             }
             SiteController::deploy(['vars' => $_GET, 'username' => $username, 'domain' => $domain]);
             SiteController::deploy(['vars' => $_GET, 'username' => $username, 'domain' => $domain]);
+            header('Content-Type: application/json; charset=utf-8', true);
+            echo json_encode(array('result' => array('status' => 'FINISHED', 'output' => null)));
+            exit();
         }
         }
         break;
         break;
     case 'revert':
     case 'revert':