fixed the issue when Author didn't update

This commit is contained in:
Alen Masic 2018-11-17 10:39:34 +01:00
parent 2a2554e7a3
commit 06bde77f51
2 changed files with 2 additions and 2 deletions

2
db.go
View file

@ -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
}

View file

@ -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 {