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