MCPcopy Create free account
hub / github.com/gogs/gogs / AfterSet

Method AfterSet

internal/database/webhook.go:125–138  ·  view source on GitHub ↗
(colName string, _ xorm.Cell)

Source from the content-addressed store, hash-verified

123}
124
125func (w *Webhook) AfterSet(colName string, _ xorm.Cell) {
126 var err error
127 switch colName {
128 case "events":
129 w.HookEvent = &HookEvent{}
130 if err = jsoniter.Unmarshal([]byte(w.Events), w.HookEvent); err != nil {
131 log.Error("Unmarshal [%d]: %v", w.ID, err)
132 }
133 case "created_unix":
134 w.Created = time.Unix(w.CreatedUnix, 0).Local()
135 case "updated_unix":
136 w.Updated = time.Unix(w.UpdatedUnix, 0).Local()
137 }
138}
139
140func (w *Webhook) SlackMeta() *SlackMeta {
141 s := &SlackMeta{}

Callers

nothing calls this directly

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected