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

Function updateHandler

service/ai-api/iml.go:88–124  ·  view source on GitHub ↗
(e *api.AiAPIInfo, i *Edit)

Source from the content-addressed store, hash-verified

86 }
87}
88func updateHandler(e *api.AiAPIInfo, i *Edit) {
89 if i.Name != nil {
90 e.Name = *i.Name
91 }
92 if i.Path != nil {
93 e.Path = *i.Path
94 }
95 if i.Description != nil {
96 e.Description = *i.Description
97 }
98 if i.Timeout != nil {
99 e.Timeout = *i.Timeout
100 }
101 if i.Retry != nil {
102 e.Retry = *i.Retry
103 }
104 if i.Model != nil {
105 e.Model = *i.Model
106 }
107 if i.Provider != nil {
108 e.Provider = *i.Provider
109 }
110 if i.AdditionalConfig != nil {
111 cfg, _ := json.Marshal(i.AdditionalConfig)
112 e.AdditionalConfig = string(cfg)
113 }
114 if i.Disable != nil {
115 e.Disable = *i.Disable
116 }
117 if i.UseToken != nil {
118 e.UseToken = *i.UseToken
119 }
120 if i.Type != nil {
121 e.Type = *i.Type
122 }
123 e.UpdateAt = time.Now()
124}
125
126var _ IAPIUseService = (*imlAPIUseService)(nil)
127

Callers

nothing calls this directly

Calls 1

MarshalMethod · 0.80

Tested by

no test coverage detected