debug
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user