mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-17 19:20:36 +08:00
Updated GetArtifacts
* No longer base64 encode, as the bytes automatically do that. * Change GetArtifactDownload to just GetArtifact for consistency * Change url to have the key on the end instead of a query parameter.
This commit is contained in:
@@ -2,7 +2,6 @@ package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"math"
|
||||
"time"
|
||||
|
||||
@@ -422,14 +421,12 @@ func (s *WorkflowServer) GetArtifact(ctx context.Context, req *api.GetArtifactRe
|
||||
return nil, err
|
||||
}
|
||||
|
||||
data, err := client.GetArtifactDownload(req.Namespace, req.Name, req.Key)
|
||||
data, err := client.GetArtifact(req.Namespace, req.Name, req.Key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
strValue := base64.StdEncoding.EncodeToString(data)
|
||||
|
||||
return &api.ArtifactResponse{
|
||||
Data: strValue,
|
||||
Data: data,
|
||||
}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user