Skip to content

Commit

Permalink
feat(file): make file non-challenge related by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pandatix committed Jun 2, 2024
1 parent 91298c6 commit 46c40e3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions provider/file_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (r *fileResource) Schema(ctx context.Context, req resource.SchemaRequest, r
},
"challenge_id": schema.StringAttribute{
MarkdownDescription: "Challenge of the file.",
Required: true,
Optional: true,
},
"name": schema.StringAttribute{
MarkdownDescription: "Name of the file as displayed to end-users.",
Expand Down Expand Up @@ -291,9 +291,5 @@ func lookForChallengeId(ctx context.Context, client *api.Client, fileID int, dia
}
}
}
diags.AddError(
"Provider Error",
fmt.Sprintf("Unable to find challenge of file %d", fileID),
)
return types.StringNull()
}

0 comments on commit 46c40e3

Please sign in to comment.