Skip to content

Commit f80495b

Browse files
committed
Removed website compile action.
1 parent e68ade5 commit f80495b

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

Symfony/src/Codebender/ApiBundle/Controller/DefaultController.php

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -22,49 +22,6 @@ public function statusAction()
2222
return new Response(json_encode(array("success" => true, "status" => "OK")));
2323
}
2424

25-
/**
26-
* compileWebsite action
27-
*
28-
* @return Response Response intance.
29-
*
30-
*/
31-
public function compileWebsiteAction($auth_key, $version)
32-
{
33-
34-
if ($auth_key !== $this->container->getParameter('auth_key'))
35-
{
36-
return new Response(json_encode(array("success" => false, "step" => 0, "message" => "Invalid authorization key.")));
37-
}
38-
39-
if ($version !== $this->container->getParameter('version'))
40-
{
41-
return new Response(json_encode(array("success" => false, "step" => 0, "message" => "Invalid api version.")));
42-
}
43-
44-
$request = $this->getRequest()->getContent();
45-
46-
$contents = json_decode($request, true);
47-
48-
$apihandler = $this->get('codebender_api.handler');
49-
50-
$personalMatchedLibs = $contents['libraries'];
51-
52-
$files = $contents["files"];
53-
54-
$headersArr = $this->checkHeaders($files, $personalMatchedLibs);
55-
56-
$contents["libraries"] = $headersArr['libraries'];
57-
$request_content = json_encode($contents);
58-
59-
// perform the actual post to the compiler
60-
$data = $apihandler->post_raw_data($this->container->getParameter('compiler'), $request_content);
61-
$decoded_compiler_data = json_decode($data, true);
62-
63-
$responsedata = array('success' => true, 'personal' => array_keys($personalMatchedLibs), 'library' => $headersArr['libraries'], 'foundFiles' => $headersArr['foundFiles'], 'notFoundHeaders' => $headersArr['notFoundHeaders'], 'compileResponse' => $decoded_compiler_data);
64-
65-
return new Response(json_encode($responsedata));
66-
}
67-
6825
/**
6926
* compile action
7027
*

0 commit comments

Comments
 (0)