Skip to content

Commit e4caefe

Browse files
committed
fix(cos): website setup tag
1 parent fa4a78e commit e4caefe

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/modules/cos/index.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,10 @@ export default class Cos {
590590
await this.setCors(inputs);
591591
}
592592

593+
if (inputs.tags) {
594+
await this.setTags(inputs);
595+
}
596+
593597
await this.setWebsite(inputs);
594598

595599
// Build environment variables
@@ -636,18 +640,12 @@ export default class Cos {
636640
}
637641
if (inputs.cors) {
638642
await this.setCors(inputs);
639-
} else {
640-
await this.deleteCors(inputs);
641643
}
642644
if (inputs.tags) {
643645
await this.setTags(inputs);
644-
} else {
645-
await this.deleteTags(inputs);
646646
}
647647
if (inputs.lifecycle) {
648648
await this.setLifecycle(inputs);
649-
} else {
650-
await this.deleteLifecycle(inputs);
651649
}
652650
if (inputs.versioning) {
653651
await this.setVersioning(inputs);

src/modules/cos/interface.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ export interface WebsiteRedirectRule {
125125
};
126126
}
127127

128-
export interface CosSetWebsiteInputs extends CosSetAclInputs, CosSetPolicyInputs, CosSetCorsInputs {
128+
export interface CosSetWebsiteInputs
129+
extends CosSetAclInputs,
130+
CosSetPolicyInputs,
131+
CosSetCorsInputs,
132+
CosSetTagInputs {
129133
bucket?: string;
130134
code?: {
131135
src: string;

0 commit comments

Comments
 (0)