working commit
This commit is contained in:
@@ -31,11 +31,6 @@ type PutFileParams struct {
|
||||
}
|
||||
type PutFileResult struct{}
|
||||
|
||||
const (
|
||||
defaultContentType = "application/octet-stream"
|
||||
hcMimeType = "application/vnd.cncf.helm.chart.content.v1.tar+gzip"
|
||||
)
|
||||
|
||||
// TODO: checking catalog and file names conflict
|
||||
func (oper *Operator) PutFile(ctx context.Context, operatorID string, params *PutFileParams) (int, *PutFileResult, error) {
|
||||
var err error
|
||||
@@ -76,8 +71,8 @@ func (oper *Operator) PutFile(ctx context.Context, operatorID string, params *Pu
|
||||
}
|
||||
var helmHash string
|
||||
var helmMeta string
|
||||
if contentType == hcMimeType {
|
||||
helmHash, helmMeta, err = oper.store.HelmMeta(tmpname)
|
||||
if contentType == hcMediaType {
|
||||
helmMeta, helmHash, err = oper.store.HelmMeta(tmpname)
|
||||
if err != nil {
|
||||
code := http.StatusInternalServerError
|
||||
return code, res, err
|
||||
|
||||
Reference in New Issue
Block a user