@@ -59,11 +59,8 @@ func EndpointCreate(ct Controller, app core.App) http.HandlerFunc {
59
59
item := helpers .EndpointSchema ().Get (form .Kind )
60
60
for _ , field := range item .Fields {
61
61
fields = append (fields , c.EndpointFormConfigField {
62
- Name : field .Name ,
63
- Description : field .Description ,
64
- Key : field .Key ,
65
- Multiline : field .Multiline ,
66
- Value : formConfig [field .Key ],
62
+ EndpointSchemaField : field ,
63
+ Value : formConfig [field .Key ],
67
64
})
68
65
}
69
66
@@ -105,11 +102,8 @@ func EndpointView(ct Controller, app core.App) http.HandlerFunc {
105
102
var fields []c.EndpointFormConfigField
106
103
for _ , field := range item .Fields {
107
104
fields = append (fields , c.EndpointFormConfigField {
108
- Name : field .Name ,
109
- Description : field .Description ,
110
- Key : field .Key ,
111
- Multiline : field .Multiline ,
112
- Value : endpoint .Config [field .Key ],
105
+ EndpointSchemaField : field ,
106
+ Value : endpoint .Config [field .Key ],
113
107
})
114
108
}
115
109
@@ -167,11 +161,8 @@ func EndpointUpdate(ct Controller, app core.App) http.HandlerFunc {
167
161
var fields []c.EndpointFormConfigField
168
162
for _ , field := range item .Fields {
169
163
fields = append (fields , c.EndpointFormConfigField {
170
- Name : field .Name ,
171
- Description : field .Description ,
172
- Key : field .Key ,
173
- Multiline : field .Multiline ,
174
- Value : formConfig [field .Key ],
164
+ EndpointSchemaField : field ,
165
+ Value : formConfig [field .Key ],
175
166
})
176
167
}
177
168
@@ -224,10 +215,7 @@ func EndpointFormConfigComponent(ct Controller, app core.App) http.HandlerFunc {
224
215
var fields []c.EndpointFormConfigField
225
216
for _ , field := range item .Fields {
226
217
fields = append (fields , c.EndpointFormConfigField {
227
- Name : field .Name ,
228
- Description : field .Description ,
229
- Key : field .Key ,
230
- Multiline : field .Multiline ,
218
+ EndpointSchemaField : field ,
231
219
})
232
220
}
233
221
0 commit comments