mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-31 05:31:10 -04:00 
			
		
		
		
	add update finish endpoints
This commit is contained in:
		| @ -8,12 +8,13 @@ use GuzzleHttp\Exception\RequestException; | ||||
| use Crater\Space\SiteApi; | ||||
| use Crater\Events\UpdateFinished; | ||||
| use Crater\Setting; | ||||
| use Illuminate\Http\Request; | ||||
|  | ||||
| class Updater | ||||
| { | ||||
|     use SiteApi; | ||||
|  | ||||
|     public static function update($installed, $version, $isMinor) | ||||
|     public static function update($installed, $version) | ||||
|     { | ||||
|         $data = null; | ||||
|         $path = null; | ||||
| @ -79,10 +80,6 @@ class Updater | ||||
|             File::deleteDirectory($temp_path); | ||||
|             File::deleteDirectory($temp_path2); | ||||
|  | ||||
|             if (!$isMinor) { | ||||
|                 event(new UpdateFinished($installed, $version)); | ||||
|             } | ||||
|  | ||||
|             return [ | ||||
|                 'success' => true, | ||||
|                 'error' => false, | ||||
| @ -104,6 +101,17 @@ class Updater | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     public static function finishUpdate($installed, $version) | ||||
|     { | ||||
|         event(new UpdateFinished($installed, $version)); | ||||
|  | ||||
|         return [ | ||||
|             'success' => true, | ||||
|             'error' => false, | ||||
|             'data' => [] | ||||
|         ]; | ||||
|     } | ||||
|  | ||||
|     public static function checkForUpdate() | ||||
|     { | ||||
|         $data = null; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user