fix(webhooks): add created by user object when creating a webhook

This commit is contained in:
kolaente 2023-10-18 22:18:45 +02:00
parent 72366a5b27
commit 61cd08fa13
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 0 deletions

View File

@ -116,6 +116,11 @@ func (w *Webhook) Create(s *xorm.Session, a web.Auth) (err error) {
// TODO: check valid webhook events
w.CreatedByID = a.GetID()
_, err = s.Insert(w)
if err != nil {
return err
}
w.CreatedBy, err = user.GetUserByID(s, a.GetID())
return
}