mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-31 05:31:10 -04:00 
			
		
		
		
	fix auto update issue in dev
This commit is contained in:
		| @ -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]); | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user