From 03fd24f1ec8f41aacb0a0ab5cf64c299a56b5606 Mon Sep 17 00:00:00 2001 From: Zhihe Li Date: Mon, 8 May 2023 14:25:42 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Update=20storage=20buck?= =?UTF-8?q?et=20aws=20plugin=20name=20(#245)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/models/storage-bucket.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/api/addon/models/storage-bucket.js b/addons/api/addon/models/storage-bucket.js index 768edfaed..1367e9802 100644 --- a/addons/api/addon/models/storage-bucket.js +++ b/addons/api/addon/models/storage-bucket.js @@ -3,7 +3,7 @@ import GeneratedStorageBucketModel from '../generated/models/storage-bucket'; export const TYPE_STORAGE_BUCKET_PLUGIN = 'plugin'; export const TYPES_STORAGE_BUCKET = Object.freeze([TYPE_STORAGE_BUCKET_PLUGIN]); -export const TYPE_STORAGE_BUCKET_PLUGIN_AWS_S3 = 'aws_s3'; +export const TYPE_STORAGE_BUCKET_PLUGIN_AWS_S3 = 'aws'; export const TYPES_STORAGE_BUCKET_PLUGIN = Object.freeze([ TYPE_STORAGE_BUCKET_PLUGIN_AWS_S3, ]); @@ -14,7 +14,7 @@ export default class StorageBucketModel extends GeneratedStorageBucketModel { * @type {boolean} */ get isPlugin() { - return this.type === 'plugin'; + return this.type === TYPE_STORAGE_BUCKET_PLUGIN; } /** @@ -34,7 +34,7 @@ export default class StorageBucketModel extends GeneratedStorageBucketModel { * @type {boolean} */ get isAWS() { - return this.compositeType === 'aws_s3'; + return this.compositeType === TYPE_STORAGE_BUCKET_PLUGIN_AWS_S3; } /** @@ -51,7 +51,7 @@ export default class StorageBucketModel extends GeneratedStorageBucketModel { * Sets `type` to `plugin` and `plugin.name` to the specified type. */ set compositeType(type) { - this.type = 'plugin'; + this.type = TYPE_STORAGE_BUCKET_PLUGIN; this.plugin = { name: type }; } }