feat(file): unify file handling with a new FileSource abstraction for URL and base64 data

This commit is contained in:
CaIon
2026-02-04 18:23:17 +08:00
parent 36d3ae1c94
commit 9ef9e78821
28 changed files with 1119 additions and 357 deletions
+2 -1
View File
@@ -148,7 +148,8 @@ func Redeem(key string, userId int) (quota int, err error) {
return err
})
if err != nil {
return 0, errors.New("兑换失败," + err.Error())
common.SysError("redemption failed: " + err.Error())
return 0, errors.New("兑换失败,请稍后重试")
}
RecordLog(userId, LogTypeTopup, fmt.Sprintf("通过兑换码充值 %s,兑换码ID %d", logger.LogQuota(redemption.Quota), redemption.Id))
return redemption.Quota, nil