mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 20:06:52 +01:00 
			
		
		
		
	 d555c42644
			
		
	
	
		d555c42644
		
			
		
	
	
	
	
		
			
			* update composer.lock * run pint * fix phpstan * update migrations (sqlite `dropForeign`) * fix migrations * Reset these back for now * Alphabetize the rules * run `php artisan filament:upgrade` --------- Co-authored-by: Lance Pioch <git@lance.sh>
		
			
				
	
	
		
			24 lines
		
	
	
		
			604 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			604 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Http\Controllers\Api\Remote\Servers;
 | |
| 
 | |
| use Illuminate\Http\Request;
 | |
| use App\Models\Server;
 | |
| use Illuminate\Http\JsonResponse;
 | |
| use App\Http\Controllers\Controller;
 | |
| 
 | |
| class ServerContainersController extends Controller
 | |
| {
 | |
|     /**
 | |
|      * Updates the server container's status on the Panel
 | |
|      */
 | |
|     public function status(Server $server, Request $request): JsonResponse
 | |
|     {
 | |
|         $status = fluent($request->json()->all())->get('data.new_state');
 | |
| 
 | |
|         cache()->put("servers.$server->uuid.container.status", $status, now()->addHour());
 | |
| 
 | |
|         return new JsonResponse([]);
 | |
|     }
 | |
| }
 |