feat: 增加重置模型倍率功能 (close #62)

This commit is contained in:
1808837298@qq.com
2024-05-24 15:28:16 +08:00
parent 222f5ec1e8
commit f723ff9ba0
9 changed files with 2811 additions and 185 deletions
-16
View File
@@ -200,19 +200,3 @@ func RetrieveModel(c *gin.Context) {
})
}
}
func GetPricing(c *gin.Context) {
userId := c.GetInt("id")
// if no login, get default group ratio
groupRatio := common.GetGroupRatio("default")
group, err := model.CacheGetUserGroup(userId)
if err == nil {
groupRatio = common.GetGroupRatio(group)
}
pricing := model.GetPricing(group)
c.JSON(200, gin.H{
"success": true,
"data": pricing,
"group_ratio": groupRatio,
})
}