Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions platform/Vercel.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ function setVercelConfig($envs, $appId, $token)
foreach ($result["envs"] as $key => $value) {
$existEnvs[$value["key"]] = $value["id"];
}
$response = null;
foreach ($envs as $key => $value) {
$response = null;
$tmp = null;
$tmp["type"] = "encrypted";
$tmp["key"] = $key;
Expand All @@ -327,8 +327,8 @@ function setVercelConfig($envs, $appId, $token)
} else {
if ($value) $response = curl("POST", $url, json_encode($tmp), $header);
}
//echo $key . " = " . $value . ", <br>" . json_encode($response, JSON_PRETTY_PRINT) . "<br>";
if ($response['stat']!=200) return $response['body'];
//echo $key . " = " . $value . ", <br>" . $response . json_encode($response, JSON_PRETTY_PRINT) . "<br>";
if (!!$response && $response['stat']!=200) return $response['body'];
}
return VercelUpdate($appId, $token);
}
Expand All @@ -351,6 +351,7 @@ function VercelUpdate($appId, $token, $sourcePath = "")

//echo json_encode($data, JSON_PRETTY_PRINT) . " ,data<br>";
$response = curl("POST", $url, json_encode($data), $header);
//echo json_encode($response, JSON_PRETTY_PRINT) . " ,res<br>";
$result = json_decode($response["body"], true);
$result['status'] = $result['id'];
return json_encode($result);
Expand Down