Fix bug for webhook and feishu caused by API changed (#13937)
* Fix bug for webhook * Fix bug for feishu
This commit is contained in:
@ -8,6 +8,7 @@ package models
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
@ -310,6 +311,7 @@ func CreateWebhook(w *Webhook) error {
|
||||
}
|
||||
|
||||
func createWebhook(e Engine, w *Webhook) error {
|
||||
w.Type = strings.TrimSpace(w.Type)
|
||||
_, err := e.Insert(w)
|
||||
return err
|
||||
}
|
||||
@ -547,7 +549,7 @@ func copyDefaultWebhooksToRepo(e Engine, repoID int64) error {
|
||||
// \/ \/ \/ \/ \/
|
||||
|
||||
// HookTaskType is the type of an hook task
|
||||
type HookTaskType string
|
||||
type HookTaskType = string
|
||||
|
||||
// Types of hook tasks
|
||||
const (
|
||||
|
Reference in New Issue
Block a user