2024-04-12 13:00:28 +03:00
|
|
|
package config
|
|
|
|
|
2024-08-28 22:41:05 +03:00
|
|
|
func (c *Config) GetAccountByMonobankId(q string) Account {
|
2024-04-12 13:00:28 +03:00
|
|
|
for _, row := range c.Accounts {
|
|
|
|
if row.MonobankId == q {
|
|
|
|
return row
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-28 22:41:05 +03:00
|
|
|
return Account{}
|
2024-04-12 13:00:28 +03:00
|
|
|
}
|
2024-08-19 13:23:20 +03:00
|
|
|
|
2024-08-28 22:41:05 +03:00
|
|
|
func (c *Config) GetAccountByFirefly3Name(q string) Account {
|
2024-08-19 13:23:20 +03:00
|
|
|
for _, row := range c.Accounts {
|
|
|
|
if row.Firefly3Name == q {
|
|
|
|
return row
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-28 22:41:05 +03:00
|
|
|
return Account{}
|
2024-08-19 13:23:20 +03:00
|
|
|
}
|