| @@ 75-87 (lines=13) @@ | ||
| 72 | * @param \SS_HTTPRequest $request |
|
| 73 | * @return \SS_HTTPResponse |
|
| 74 | */ |
|
| 75 | public function history(\SS_HTTPRequest $request) { |
|
| 76 | $data = []; |
|
| 77 | ||
| 78 | $list = $this->environment->DeployHistory('DeployStarted'); |
|
| 79 | ||
| 80 | foreach ($list as $deployment) { |
|
| 81 | $data[] = $this->formatter->getDeploymentData($deployment); |
|
| 82 | } |
|
| 83 | ||
| 84 | return $this->getAPIResponse([ |
|
| 85 | 'list' => $data, |
|
| 86 | ], 200); |
|
| 87 | } |
|
| 88 | ||
| 89 | /** |
|
| 90 | * @param \SS_HTTPRequest $request |
|
| @@ 93-102 (lines=10) @@ | ||
| 90 | * @param \SS_HTTPRequest $request |
|
| 91 | * @return \SS_HTTPResponse |
|
| 92 | */ |
|
| 93 | public function upcoming(\SS_HTTPRequest $request) { |
|
| 94 | $data = []; |
|
| 95 | $list = $this->environment->UpcomingDeployments(); |
|
| 96 | foreach ($list as $deployment) { |
|
| 97 | $data[] = $this->formatter->getDeploymentData($deployment); |
|
| 98 | } |
|
| 99 | return $this->getAPIResponse([ |
|
| 100 | 'list' => $data, |
|
| 101 | ], 200); |
|
| 102 | } |
|
| 103 | ||
| 104 | /** |
|
| 105 | * @param \SS_HTTPRequest $request |
|