mirror of
https://github.com/aclindsa/moneygo.git
synced 2025-07-03 04:38:38 -04:00
Split securities into models
This commit is contained in:
@ -54,7 +54,7 @@ func InsertUser(tx *Tx, u *models.User) error {
|
||||
}
|
||||
|
||||
// Copy the security template and give it our new UserId
|
||||
var security Security
|
||||
var security models.Security
|
||||
security = *security_template
|
||||
security.UserId = u.UserId
|
||||
|
||||
@ -89,7 +89,7 @@ func UpdateUser(tx *Tx, u *models.User) error {
|
||||
return err
|
||||
} else if security.UserId != u.UserId || security.SecurityId != u.DefaultCurrency {
|
||||
return errors.New("UserId and DefaultCurrency don't match the fetched security")
|
||||
} else if security.Type != Currency {
|
||||
} else if security.Type != models.Currency {
|
||||
return errors.New("New DefaultCurrency security is not a currency")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user