mirror of
https://github.com/woodchen-ink/aimodels-prices.git
synced 2025-07-18 05:32:00 +08:00
fix(prices.go): 移除更新价格状态和批准所有价格功能中的冗余字段"updated_by",简化更新逻辑
This commit is contained in:
parent
017cef3048
commit
8fa93b6a53
@ -482,7 +482,6 @@ func UpdatePriceStatus(c *gin.Context) {
|
||||
updateMap["temp_input_image_tokens"] = nil
|
||||
updateMap["temp_output_image_tokens"] = nil
|
||||
updateMap["temp_price_source"] = nil
|
||||
updateMap["updated_by"] = nil
|
||||
|
||||
if err := tx.Model(&price).Updates(updateMap).Error; err != nil {
|
||||
tx.Rollback()
|
||||
@ -744,7 +743,6 @@ func ApproveAllPrices(c *gin.Context) {
|
||||
updateMap["temp_input_image_tokens"] = nil
|
||||
updateMap["temp_output_image_tokens"] = nil
|
||||
updateMap["temp_price_source"] = nil
|
||||
updateMap["updated_by"] = nil
|
||||
|
||||
if err := tx.Model(&price).Updates(updateMap).Error; err != nil {
|
||||
tx.Rollback()
|
||||
|
Loading…
x
Reference in New Issue
Block a user