Explorar el Código

new AccountController

andre hace 7 meses
padre
commit
b964a54d48
Se han modificado 2 ficheros con 6 adiciones y 1 borrados
  1. 1 1
      api/sitebuilder.php
  2. 5 0
      siteBuilder.php

+ 1 - 1
api/sitebuilder.php

@@ -167,7 +167,7 @@ class ApiClient {
      * Creates a user and placeholder webpage
      *
      * @param username:        The username under which the domain is deployed
-     * @param domain:          The Domain to delete
+     * @param domain:          The Domain to create
      *
      * @return                  a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
      *                          or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];

+ 5 - 0
siteBuilder.php

@@ -138,6 +138,11 @@ function siteBuilder_CreateAccount($params) {
 			);
 		return 'Error: could save username & serviceid in database';
 	}	
+	$siteBuilder = new ApiClient(getSiteBuilderApiURL($params), $params['serveraccesshash']);
+	$response = $siteBuilder->create($params['domain'],$params['username']);
+	if($response['status'] != '200') {
+		return 'Error: ' . $response['response'];
+	}
 	return 'success';
 }