andre 7 ماه پیش
والد
کامیت
043dd86164
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      index.php

+ 6 - 0
index.php

@@ -91,12 +91,18 @@ switch ($endpoint) {
                 error_log("POST: " . print_r($_POST, true));
             }
             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 ($GLOBALS['debug'] == true) {
                 error_log("GET: " . print_r($_GET, true));
             }
             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;
     case 'revert':