refactor auto updateand invoice and estimate send

This commit is contained in:
jayvirsinh_gohil
2019-11-15 13:39:57 +05:30
parent 917b618ac7
commit 1051b03b00
4 changed files with 17 additions and 12 deletions

View File

@ -13,12 +13,12 @@ class Updater
{
use SiteApi;
public static function update($installed, $version)
public static function update($installed, $version, $isMinor)
{
$data = null;
$path = null;
$url = '/download/'.$version;
$url = '/download/'.$version.'?type=update';
$response = static::getRemote($url, ['timeout' => 100, 'track_redirects' => true]);
@ -78,7 +78,9 @@ class Updater
File::deleteDirectory($temp_path2);
try {
event(new UpdateFinished($installed, $version));
if (!$isMinor) {
event(new UpdateFinished($installed, $version));
}
return [
'success' => true,