FX Modul
This commit is contained in:
19
modules/fx-rates/pages/index.php
Normal file
19
modules/fx-rates/pages/index.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once dirname(__DIR__) . '/bootstrap.php';
|
||||
|
||||
$settings = module_fn('fx-rates', 'settings');
|
||||
$service = module_fn('fx-rates', 'service');
|
||||
$latest = $service->latestStatus();
|
||||
?>
|
||||
<?= module_shell_header('fx-rates', ['title' => 'Waehrungskurse']) ?>
|
||||
<div class="module-copy">
|
||||
<h1>Waehrungskurse</h1>
|
||||
<p>Zentrale Quelle fuer FX-Snapshots, Zeitabfragen und manuelle Aktualisierung.</p>
|
||||
<p><strong>Standard-Basis:</strong> <?= e((string) ($settings['default_base_currency'] ?? 'EUR')) ?></p>
|
||||
<p><strong>Scheduler:</strong> taeglich um <?= e(str_pad((string) ($settings['daily_refresh_hour'] ?? 18), 2, '0', STR_PAD_LEFT)) ?>:00 (<?= e((string) ($settings['schedule_timezone'] ?? 'Europe/Berlin')) ?>)</p>
|
||||
<p><strong>Letzter Abruf:</strong> <?= e((string) ($latest['fetched_at'] ?? 'noch keiner')) ?></p>
|
||||
<p><strong>API:</strong> <code>/api/fx-rates/v1/latest</code>, <code>/api/fx-rates/v1/rate</code>, <code>/api/fx-rates/v1/history</code>, <code>/api/fx-rates/v1/refresh</code></p>
|
||||
</div>
|
||||
<?= module_shell_footer() ?>
|
||||
Reference in New Issue
Block a user