mirror of
https://github.com/linux-do/new-api.git
synced 2025-12-26 00:25:57 +08:00
fix: fix image-seed error
This commit is contained in:
@@ -266,24 +266,6 @@ func RelayMidjourneyTaskImageSeed(c *gin.Context) *dto.MidjourneyResponse {
|
||||
if err != nil {
|
||||
return &midjResponseWithStatus.Response
|
||||
}
|
||||
//defer func(ctx context.Context) {
|
||||
// err := model.PostConsumeTokenQuota(tokenId, userQuota, quota, 0, true)
|
||||
// if err != nil {
|
||||
// common.SysError("error consuming token remain quota: " + err.Error())
|
||||
// }
|
||||
// err = model.CacheUpdateUserQuota(userId)
|
||||
// if err != nil {
|
||||
// common.SysError("error update user quota cache: " + err.Error())
|
||||
// }
|
||||
// if quota != 0 {
|
||||
// tokenName := c.GetString("token_name")
|
||||
// logContent := fmt.Sprintf("模型固定价格 %.2f,分组倍率 %.2f,操作 %s", modelPrice, groupRatio, midjRequest.Action)
|
||||
// model.RecordConsumeLog(ctx, userId, channelId, 0, 0, modelName, tokenName, quota, logContent, tokenId, userQuota, 0, false)
|
||||
// model.UpdateUserUsedQuotaAndRequestCount(userId, quota)
|
||||
// channelId := c.GetInt("channel_id")
|
||||
// model.UpdateChannelUsedQuota(channelId, quota)
|
||||
// }
|
||||
//}(c.Request.Context())
|
||||
midjResponse := &midjResponseWithStatus.Response
|
||||
c.Writer.WriteHeader(midjResponseWithStatus.StatusCode)
|
||||
respBody, err := json.Marshal(midjResponse)
|
||||
|
||||
Reference in New Issue
Block a user