fix(api): correct variable name from traderRecord to trader

Fixed compilation error caused by variable name mismatch:
- Line 404: defined as 'trader'
- Line 425: was using 'traderRecord' (undefined)
This aligns with upstream dev branch naming convention.
This commit is contained in:
ZhouYongyou
2025-11-03 20:55:41 +08:00
parent 93e9b505cf
commit 2ca627ff72

View File

@@ -437,7 +437,7 @@ func (s *Server) handleCreateTrader(c *gin.Context) {
}
// 保存到数据库
err = s.database.CreateTrader(traderRecord)
err = s.database.CreateTrader(trader)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": fmt.Sprintf("创建交易员失败: %v", err)})
return