Skip to content

Commit

Permalink
chore: fix formatting and double newline
Browse files Browse the repository at this point in the history
  • Loading branch information
teutat3s committed Nov 20, 2023
1 parent 53e295d commit 7cef1a0
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions hostingde/record_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ type recordResource struct {

// recordResourceModel maps the DNSRecord resource schema data.
type recordResourceModel struct {
ID types.String `tfsdk:"id"`
ZoneID types.String `tfsdk:"zone_id"`
Name types.String `tfsdk:"name"`
Type types.String `tfsdk:"type"`
Content types.String `tfsdk:"content"`
TTL types.Int64 `tfsdk:"ttl"`
Priority types.Int64 `tfsdk:"priority"`
ID types.String `tfsdk:"id"`
ZoneID types.String `tfsdk:"zone_id"`
Name types.String `tfsdk:"name"`
Type types.String `tfsdk:"type"`
Content types.String `tfsdk:"content"`
TTL types.Int64 `tfsdk:"ttl"`
Priority types.Int64 `tfsdk:"priority"`
}

// Metadata returns the resource type name.
Expand Down Expand Up @@ -215,13 +215,13 @@ func (r *recordResource) Update(ctx context.Context, req resource.UpdateRequest,

// Generate API request body from plan
record := DNSRecord{
Name: plan.Name.ValueString(),
ID: plan.ID.ValueString(),
ZoneID: plan.ZoneID.ValueString(),
Type: plan.Type.ValueString(),
Content: plan.Content.ValueString(),
TTL: int(plan.TTL.ValueInt64()),
Priority: int(plan.Priority.ValueInt64()),
Name: plan.Name.ValueString(),
ID: plan.ID.ValueString(),
ZoneID: plan.ZoneID.ValueString(),
Type: plan.Type.ValueString(),
Content: plan.Content.ValueString(),
TTL: int(plan.TTL.ValueInt64()),
Priority: int(plan.Priority.ValueInt64()),
}

recordReq := RecordsUpdateRequest{
Expand Down Expand Up @@ -258,7 +258,6 @@ func (r *recordResource) Update(ctx context.Context, req resource.UpdateRequest,
plan.Priority = types.Int64Value(int64(returnedRecord.Priority))
}


diags = resp.State.Set(ctx, plan)
resp.Diagnostics.Append(diags...)
if resp.Diagnostics.HasError() {
Expand Down

0 comments on commit 7cef1a0

Please sign in to comment.