Skip to content

Commit

Permalink
Address conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
prakashsvmx committed Jun 2, 2021
1 parent 35a6354 commit 56da9c9
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/main/minio.js
Original file line number Diff line number Diff line change
Expand Up @@ -2793,22 +2793,23 @@ export class Client {
if(!_.isEmpty(encryptionConfig) && encryptionConfig.Rule.length >1){
throw new errors.InvalidArgumentError('Invalid Rule length. Only one rule is allowed.: ' + encryptionConfig.Rule)
}

if (!isFunction(cb)) {
if (cb && !isFunction(cb)) {
throw new TypeError('callback should be of type "function"')
}

const encryptionObj = _.isEmpty(encryptionConfig) ? {
let encryptionObj =encryptionConfig
if(_.isEmpty(encryptionConfig)) {
encryptionObj={
//Default MinIO Server Supported Rule
Rule:[
{
ApplyServerSideEncryptionByDefault: {
SSEAlgorithm:"AES256"
Rule:[
{
ApplyServerSideEncryptionByDefault: {
SSEAlgorithm:"AES256"
}
}
}
]
]

} : encryptionConfig
}}

let method = 'PUT'
let query = "encryption"
Expand Down

0 comments on commit 56da9c9

Please sign in to comment.