changes to model
This commit is contained in:
@@ -40,13 +40,13 @@ func AddTradeHandler(db *sql.DB) http.HandlerFunc {
|
||||
}
|
||||
|
||||
trade := model.Trade{
|
||||
Ticker: *company,
|
||||
Shares: req.Shares,
|
||||
Product: model.TradeProduct(req.Product),
|
||||
Type: model.TradeType(req.Type),
|
||||
Price: req.Price,
|
||||
Currency: currency.Name,
|
||||
Date: req.Date,
|
||||
Symbol: company.Symbol,
|
||||
Shares: req.Shares,
|
||||
Product: model.TradeProduct(req.Product),
|
||||
Type: model.TradeType(req.Type),
|
||||
Price: req.Price,
|
||||
CurrencyCode: currency.Code,
|
||||
Date: req.Date,
|
||||
}
|
||||
|
||||
database.InsertTrade(db, trade)
|
||||
|
||||
Reference in New Issue
Block a user