Skip to content

Commit 71a4c65

Browse files
committed
fix: Renamed model.GlobalFlagModel.Region to model.Region to stay consistent
1 parent 7b8daa4 commit 71a4c65

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

internal/cmd/object-storage/bucket/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
122122
}
123123

124124
func buildRequest(ctx context.Context, model *inputModel, apiClient *objectstorage.APIClient) objectstorage.ApiCreateBucketRequest {
125-
req := apiClient.CreateBucket(ctx, model.ProjectId, model.GlobalFlagModel.Region, model.BucketName)
125+
req := apiClient.CreateBucket(ctx, model.ProjectId, model.Region, model.BucketName)
126126
return req
127127
}
128128

internal/cmd/object-storage/credentials-group/delete/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,6 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
104104
}
105105

106106
func buildRequest(ctx context.Context, model *inputModel, apiClient *objectstorage.APIClient) objectstorage.ApiDeleteCredentialsGroupRequest {
107-
req := apiClient.DeleteCredentialsGroup(ctx, model.ProjectId, model.GlobalFlagModel.Region, model.CredentialsGroupId)
107+
req := apiClient.DeleteCredentialsGroup(ctx, model.ProjectId, model.Region, model.CredentialsGroupId)
108108
return req
109109
}

internal/cmd/object-storage/credentials/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command) (*inputModel, error) {
129129
}
130130

131131
func buildRequest(ctx context.Context, model *inputModel, apiClient *objectstorage.APIClient) objectstorage.ApiCreateAccessKeyRequest {
132-
req := apiClient.CreateAccessKey(ctx, model.ProjectId, model.GlobalFlagModel.Region)
132+
req := apiClient.CreateAccessKey(ctx, model.ProjectId, model.Region)
133133
req = req.CredentialsGroup(model.CredentialsGroupId)
134134
req = req.CreateAccessKeyPayload(objectstorage.CreateAccessKeyPayload{
135135
Expires: model.ExpireDate,

internal/cmd/object-storage/credentials/delete/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
120120
}
121121

122122
func buildRequest(ctx context.Context, model *inputModel, apiClient *objectstorage.APIClient) objectstorage.ApiDeleteAccessKeyRequest {
123-
req := apiClient.DeleteAccessKey(ctx, model.ProjectId, model.GlobalFlagModel.Region, model.CredentialsId)
123+
req := apiClient.DeleteAccessKey(ctx, model.ProjectId, model.Region, model.CredentialsId)
124124
req = req.CredentialsGroup(model.CredentialsGroupId)
125125
return req
126126
}

internal/cmd/object-storage/credentials/list/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command) (*inputModel, error) {
131131
}
132132

133133
func buildRequest(ctx context.Context, model *inputModel, apiClient *objectstorage.APIClient) objectstorage.ApiListAccessKeysRequest {
134-
req := apiClient.ListAccessKeys(ctx, model.ProjectId, model.GlobalFlagModel.Region)
134+
req := apiClient.ListAccessKeys(ctx, model.ProjectId, model.Region)
135135
req = req.CredentialsGroup(model.CredentialsGroupId)
136136
return req
137137
}

0 commit comments

Comments
 (0)