feat: align ids to int64
This commit is contained in:
@@ -3,17 +3,13 @@ package services
|
||||
import (
|
||||
"context"
|
||||
|
||||
"quyun/v2/pkg/consts"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
// @provider
|
||||
type audit struct{}
|
||||
|
||||
func (s *audit) Log(ctx context.Context, action, targetID, detail string) {
|
||||
operatorID := cast.ToInt64(ctx.Value(consts.CtxKeyUser))
|
||||
func (s *audit) Log(ctx context.Context, operatorID int64, action, targetID, detail string) {
|
||||
logrus.WithFields(logrus.Fields{
|
||||
"audit": true,
|
||||
"operator": operatorID,
|
||||
|
||||
Reference in New Issue
Block a user