update deps to latest releases (#3425)
This commit is contained in:
@@ -257,10 +257,15 @@ func listKeys(ctx context.Context, pattern string, minioClient MinioAdmin) (*mod
|
||||
return &models.KmsListKeysResponse{Results: parseKeys(results)}, nil
|
||||
}
|
||||
|
||||
// printDate - human friendly formatted date.
|
||||
const (
|
||||
printDate = "2006-01-02 15:04:05 MST"
|
||||
)
|
||||
|
||||
func parseKeys(results []madmin.KMSKeyInfo) (data []*models.KmsKeyInfo) {
|
||||
for _, key := range results {
|
||||
data = append(data, &models.KmsKeyInfo{
|
||||
CreatedAt: key.CreatedAt,
|
||||
CreatedAt: key.CreatedAt.Format(printDate),
|
||||
CreatedBy: key.CreatedBy,
|
||||
Name: key.Name,
|
||||
})
|
||||
|
||||
@@ -156,7 +156,7 @@ func serveWS(w http.ResponseWriter, req *http.Request) {
|
||||
session, err := auth.GetClaimsFromTokenInRequest(req)
|
||||
if err != nil && (errors.Is(err, auth.ErrReadingToken) && !strings.HasPrefix(wsPath, `/objectManager`)) {
|
||||
ErrorWithContext(ctx, err)
|
||||
errorsApi.ServeError(w, req, errorsApi.New(http.StatusUnauthorized, err.Error()))
|
||||
errorsApi.ServeError(w, req, errorsApi.New(http.StatusUnauthorized, "%v", err))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user