Skip to content
This repository was archived by the owner on Sep 22, 2020. It is now read-only.

Commit df55671

Browse files
committed
main: fix output format
The javascript frontend was expecting an array of entries, not a report.
1 parent ca61ee9 commit df55671

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

validate.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,10 @@ func putValidate(r *http.Request) (interface{}, nap.Status) {
104104
}
105105
return rpt.Entries(), nap.OK{}
106106
case ignConfig.ErrUnknownVersion:
107-
return report.Report{
108-
Entries: []report.Entry{{
109-
Kind: report.EntryError,
110-
Message: "Failed to parse config. Is this a valid Ignition Config, Cloud-Config, or script?",
111-
}},
112-
}, nap.OK{}
107+
return []report.Entry{{
108+
Kind: report.EntryError,
109+
Message: "Failed to parse config. Is this a valid Ignition Config, Cloud-Config, or script?",
110+
}}, nap.OK{}
113111
default:
114112
rpt.Sort()
115113
return rpt.Entries, nap.OK{}

0 commit comments

Comments
 (0)