umstellung
This commit is contained in:
@@ -19,7 +19,7 @@ $instrumentTable = module_fn('boersenchecker', 'table', 'instruments');
|
||||
$positionTable = module_fn('boersenchecker', 'table', 'positions');
|
||||
|
||||
$stmt = $pdo->prepare(
|
||||
'SELECT i.id, i.name, i.symbol
|
||||
'SELECT i.id, i.name, i.symbol, i.isin
|
||||
FROM ' . $instrumentTable . ' i
|
||||
INNER JOIN ' . $positionTable . ' p ON p.instrument_id = i.id
|
||||
WHERE i.id = :id AND p.owner_sub = :owner_sub
|
||||
@@ -37,12 +37,12 @@ if (!is_array($instrument)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$symbol = trim((string) ($instrument['symbol'] ?? ''));
|
||||
if ($symbol === '') {
|
||||
echo json_encode(['ok' => false, 'message' => 'Fuer diese Aktie ist kein Symbol hinterlegt.'], JSON_UNESCAPED_UNICODE);
|
||||
$isin = strtoupper(trim((string) ($instrument['isin'] ?? '')));
|
||||
if ($isin === '') {
|
||||
echo json_encode(['ok' => false, 'message' => 'Fuer diese Aktie ist keine ISIN hinterlegt.'], JSON_UNESCAPED_UNICODE);
|
||||
exit;
|
||||
}
|
||||
|
||||
$result = module_fn('boersenchecker', 'alpha_vantage_fetch_chart_series', $symbol);
|
||||
$result = module_fn('boersenchecker', 'bavest_fetch_chart_series', $isin);
|
||||
echo json_encode($result, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user