Fix shares and keywords
This commit is contained in:
@@ -14,7 +14,7 @@ export interface Fruit {
|
||||
}
|
||||
|
||||
export interface Share {
|
||||
symbol: string;
|
||||
isin: string;
|
||||
}
|
||||
|
||||
export interface Keyword {
|
||||
@@ -80,9 +80,9 @@ export class BotSettingsComponent implements OnInit {
|
||||
const value = (event.value || '').trim();
|
||||
|
||||
// Add share to database
|
||||
if (value && !this.shares.includes({ symbol: value.toLowerCase() })) {
|
||||
if (value && !this.shares.includes({ isin: value.toLowerCase() })) {
|
||||
console.log('Added: ' + value);
|
||||
this.botService.createShare(value).subscribe((result) => {
|
||||
this.botService.createShare(value, 'Comment').subscribe((result) => {
|
||||
console.log(result);
|
||||
});
|
||||
}
|
||||
@@ -99,7 +99,7 @@ export class BotSettingsComponent implements OnInit {
|
||||
}
|
||||
|
||||
async removeShare(share: Share): Promise<void> {
|
||||
this.botService.deleteShare(share.symbol).subscribe((result) => {
|
||||
this.botService.deleteShare(share.isin).subscribe((result) => {
|
||||
console.log(result);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user