(id int, quota int)
| 734 | } |
| 735 | |
| 736 | func UpdateUserUsedQuotaAndRequestCount(id int, quota int) { |
| 737 | if common.BatchUpdateEnabled { |
| 738 | addNewRecord(BatchUpdateTypeUsedQuota, id, quota) |
| 739 | addNewRecord(BatchUpdateTypeRequestCount, id, 1) |
| 740 | return |
| 741 | } |
| 742 | updateUserUsedQuotaAndRequestCount(id, quota, 1) |
| 743 | } |
| 744 | |
| 745 | func updateUserUsedQuotaAndRequestCount(id int, quota int, count int) { |
| 746 | err := DB.Model(&User{}).Where("id = ?", id).Updates( |
no test coverage detected