MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / updateHandler

Method updateHandler

service/system-apikey/iml.go:46–64  ·  view source on GitHub ↗
(e *system.APIKey, t *Update)

Source from the content-addressed store, hash-verified

44}
45
46func (i *imlAPIKeyService) updateHandler(e *system.APIKey, t *Update) {
47 isUpdate := false
48 if t.Name != nil {
49 e.Name = *t.Name
50 isUpdate = true
51 }
52 if t.Value != nil {
53 e.Value = *t.Value
54 isUpdate = true
55 }
56 if t.Expired != nil {
57 e.Expired = *t.Expired
58 isUpdate = true
59 }
60 if isUpdate {
61 e.UpdateAt = time.Now()
62 }
63
64}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected