租房小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
628 B

6 months ago
  1. const { checkBucketName: _checkBucketName } = require('../utils/checkBucketName');
  2. const proto = exports;
  3. /**
  4. * getBucketEncryption
  5. * @param {String} bucketName - bucket name
  6. */
  7. proto.getBucketEncryption = async function getBucketEncryption(bucketName) {
  8. _checkBucketName(bucketName);
  9. const params = this._bucketRequestParams('GET', bucketName, 'encryption');
  10. params.successStatuses = [200];
  11. params.xmlResponse = true;
  12. const result = await this.request(params);
  13. const encryption = result.data.ApplyServerSideEncryptionByDefault;
  14. return {
  15. encryption,
  16. status: result.status,
  17. res: result.res
  18. };
  19. };