You've already forked monobank-firefly3-bot
Add support for multi-currency transfers
This commit is contained in:
@ -8,6 +8,7 @@ type Config struct {
|
||||
type ConfigAccount struct {
|
||||
Firefly3Name string `json:"firefly3_name,omitempty"`
|
||||
MonobankId string `json:"monobank_id,omitempty"`
|
||||
Currency string `json:"currency,omitempty"`
|
||||
}
|
||||
|
||||
type ConfigTransactionTypes struct {
|
||||
|
@ -9,3 +9,13 @@ func (c *Config) GetAccountByMonobankId(q string) ConfigAccount {
|
||||
|
||||
return ConfigAccount{}
|
||||
}
|
||||
|
||||
func (c *Config) GetAccountByFirefly3Name(q string) ConfigAccount {
|
||||
for _, row := range c.Accounts {
|
||||
if row.Firefly3Name == q {
|
||||
return row
|
||||
}
|
||||
}
|
||||
|
||||
return ConfigAccount{}
|
||||
}
|
||||
|
Reference in New Issue
Block a user