mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-19 15:40:50 +00:00
Fix bug for webhook and feishu caused by API changed (#13937)
* Fix bug for webhook * Fix bug for feishu
This commit is contained in:
parent
b35546631e
commit
ea914d0f7a
3 changed files with 37 additions and 57 deletions
|
@ -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 (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue