feat(audit): add localized security audit logs (#5462)
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/QuantumNous/new-api/common"
|
||||
"github.com/QuantumNous/new-api/i18n"
|
||||
"github.com/QuantumNous/new-api/logger"
|
||||
"github.com/QuantumNous/new-api/model"
|
||||
"github.com/QuantumNous/new-api/setting/operation_setting"
|
||||
|
||||
@@ -110,6 +111,11 @@ func AddRedemption(c *gin.Context) {
|
||||
}
|
||||
keys = append(keys, key)
|
||||
}
|
||||
recordManageAudit(c, "redemption.create", map[string]interface{}{
|
||||
"name": redemption.Name,
|
||||
"count": redemption.Count,
|
||||
"quota": logger.LogQuota(redemption.Quota),
|
||||
})
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": true,
|
||||
"message": "",
|
||||
|
||||
Reference in New Issue
Block a user