mirror of
https://github.com/moul/sshportal.git
synced 2025-01-11 01:47:46 +08:00
fixed the issue when Author didn't update
This commit is contained in:
parent
2a2554e7a3
commit
06bde77f51
2 changed files with 2 additions and 2 deletions
2
db.go
2
db.go
|
@ -447,7 +447,7 @@ func (e *Event) Log(db *gorm.DB) {
|
|||
}
|
||||
|
||||
func (e *Event) SetAuthor(user *User) *Event {
|
||||
e.Author = user
|
||||
//e.Author = user
|
||||
e.AuthorID = user.ID
|
||||
return e
|
||||
}
|
||||
|
|
2
shell.go
2
shell.go
|
@ -2187,7 +2187,7 @@ GLOBAL OPTIONS:
|
|||
if len(words) == 0 {
|
||||
continue
|
||||
}
|
||||
NewEvent("shell", words[0]).SetArg("interactive", true).SetArg("args", words[1:]).Log(db)
|
||||
NewEvent("shell", words[0]).SetAuthor(myself).SetArg("interactive", true).SetArg("args", words[1:]).Log(db)
|
||||
if err := app.Run(append([]string{"config"}, words...)); err != nil {
|
||||
if cliErr, ok := err.(*cli.ExitError); ok {
|
||||
if cliErr.ExitCode() != 0 {
|
||||
|
|
Loading…
Reference in a new issue