change endpoint & type
This commit is contained in:
		@@ -9,7 +9,7 @@ function fetch_api($url) {
 | 
			
		||||
    return $json ? json_decode($json, true) : [];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
$messages = fetch_api("https://api.sat.regattatech.de/api/v1/messages");
 | 
			
		||||
$messages = fetch_api("https://api.sat.regattatech.de/api/v1/message");
 | 
			
		||||
$resultsData = fetch_api("https://api.sat.regattatech.de/api/v1/results/current/");
 | 
			
		||||
$rennplanData = fetch_api("https://api.sat.regattatech.de/api/v1/rennplan/current/");
 | 
			
		||||
 | 
			
		||||
@@ -31,7 +31,7 @@ function render_message_box($message) {
 | 
			
		||||
    $typeMap = [
 | 
			
		||||
        'info' => 'success',
 | 
			
		||||
        'warning' => 'warning',
 | 
			
		||||
        'danger' => 'danger'
 | 
			
		||||
        'error' => 'danger'
 | 
			
		||||
    ];
 | 
			
		||||
    $type = $typeMap[$message['type']] ?? 'secondary';
 | 
			
		||||
    return "<div class='alert alert-{$type} fs-5' role='alert'>{$message['message']}</div>";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user