weldr: Update the sourceNewHandler to use the correct struct
The store supports different fields than the API, this switches to using an API specific struct with support for proxy and gpgkey_files.
This commit is contained in:
parent
01aca4ecf7
commit
6e40729cd3
1 changed files with 2 additions and 2 deletions
|
|
@ -354,7 +354,7 @@ func (api *API) sourceNewHandler(writer http.ResponseWriter, request *http.Reque
|
|||
return
|
||||
}
|
||||
|
||||
var source store.SourceConfig
|
||||
var source SourceConfigV0
|
||||
var err error
|
||||
if contentType[0] == "application/json" {
|
||||
err = json.NewDecoder(request.Body).Decode(&source)
|
||||
|
|
@ -374,7 +374,7 @@ func (api *API) sourceNewHandler(writer http.ResponseWriter, request *http.Reque
|
|||
return
|
||||
}
|
||||
|
||||
api.store.PushSource(source)
|
||||
api.store.PushSource(source.SourceConfig())
|
||||
|
||||
statusResponseOK(writer)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue