mirror of
https://github.com/aclindsa/moneygo.git
synced 2025-07-01 12:08:37 -04:00
Add user-editable securities, strip hard-coded ones from securities.go
This commit is contained in:
@ -294,6 +294,7 @@ func InsertTransactionTx(transaction *gorp.Transaction, t *Transaction, user *Us
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func InsertTransaction(t *Transaction, user *User) error {
|
||||
transaction, err := DB.Begin()
|
||||
if err != nil {
|
||||
@ -692,7 +693,10 @@ func GetAccountTransactions(user *User, accountid int64, sort string, page uint6
|
||||
}
|
||||
atl.TotalTransactions = count
|
||||
|
||||
security := GetSecurity(atl.Account.SecurityId)
|
||||
security, err := GetSecurity(atl.Account.SecurityId, user.UserId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if security == nil {
|
||||
return nil, errors.New("Security not found")
|
||||
}
|
||||
|
Reference in New Issue
Block a user