mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Add method to record.
This commit is contained in:
@ -31,6 +31,7 @@ type Record struct {
|
||||
Organization string `xorm:"varchar(100)" json:"organization"`
|
||||
ClientIp string `xorm:"varchar(100)" json:"clientIp"`
|
||||
User string `xorm:"varchar(100)" json:"user"`
|
||||
Method string `xorm:"varchar(100)" json:"method"`
|
||||
RequestUri string `xorm:"varchar(1000)" json:"requestUri"`
|
||||
Action string `xorm:"varchar(1000)" json:"action"`
|
||||
|
||||
@ -45,8 +46,9 @@ func NewRecord(ctx *context.Context) *Record {
|
||||
Name: util.GenerateId(),
|
||||
CreatedTime: util.GetCurrentTime(),
|
||||
ClientIp: ip,
|
||||
RequestUri: ctx.Request.RequestURI,
|
||||
User: "",
|
||||
Method: ctx.Request.Method,
|
||||
RequestUri: ctx.Request.RequestURI,
|
||||
Action: action,
|
||||
IsTriggered: false,
|
||||
}
|
||||
|
Reference in New Issue
Block a user