debug
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-24 23:12:19 +02:00
parent 92c9bed5bb
commit 739e4d4c42
6 changed files with 352 additions and 29 deletions

View File

@@ -224,19 +224,19 @@ final class InstrumentPage
throw new RuntimeException((string) ($apiResult['message'] ?? 'API-Abruf fehlgeschlagen.'));
}
$stmtInsert = $this->pdo->prepare(
'INSERT INTO ' . $this->quoteTable . ' (instrument_id, price, currency, quoted_at, source)
VALUES (:instrument_id, :price, :currency, :quoted_at, :source)'
$storeResult = \module_fn(
'boersenchecker',
'store_market_quote',
$instrumentId,
(float) $apiResult['price'],
strtoupper(trim((string) ($instrument['quote_currency'] ?? $this->defaultReportCurrency))) ?: $this->defaultReportCurrency,
(string) $apiResult['fetched_at'],
(string) $apiResult['source']
);
$stmtInsert->execute([
'instrument_id' => $instrumentId,
'price' => (float) $apiResult['price'],
'currency' => strtoupper(trim((string) ($instrument['quote_currency'] ?? $this->defaultReportCurrency))) ?: $this->defaultReportCurrency,
'quoted_at' => (string) $apiResult['fetched_at'],
'source' => (string) $apiResult['source'],
]);
return 'Bavest-Kurs gespeichert.';
return !empty($storeResult['inserted'])
? 'Bavest-Kurs gespeichert.'
: 'Vorhandener Bavest-Snapshot wiederverwendet.';
}
private function searchSymbol(): string