fix auto update issue in dev

This commit is contained in:
raishvaria
2020-01-22 13:39:59 +05:30
parent da996c1f33
commit 13e56105e3
2 changed files with 30 additions and 5 deletions

View File

@ -19,7 +19,13 @@ class Updater
$data = null;
$path = null;
$url = 'https://craterapp.com/downloads/file/'.$version.'?type=update';
if(env('APP_ENV') === 'development')
{
$url = 'https://craterapp.com/downloads/file/'.$version.'?type=update&is_dev=1';
} else {
$url = 'https://craterapp.com/downloads/file/'.$version.'?type=update';
}
$response = static::getRemote($url, ['timeout' => 100, 'track_redirects' => true]);
@ -115,7 +121,12 @@ class Updater
public static function checkForUpdate()
{
$data = null;
$url = 'https://craterapp.com/downloads/check/latest/'. Setting::getSetting('version') . '?type=update';
if(env('APP_ENV') === 'development')
{
$url = 'https://craterapp.com/downloads/check/latest/'. Setting::getSetting('version') . '?type=update&is_dev=1';
} else {
$url = 'https://craterapp.com/downloads/check/latest/'. Setting::getSetting('version') . '?type=update';
}
$response = static::getRemote($url, ['timeout' => 100, 'track_redirects' => true]);