Skip to content

Commit

Permalink
fix(files): deduce file type from parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
pandatix committed Jun 2, 2024
1 parent 43411c6 commit f37111d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ func (client *Client) PostFiles(params *PostFilesParams, opts ...Option) ([]*Fil
mp := map[string]any{
"file": params.Files,
"nonce": client.nonce,
"type": "challenge",
"type": "standard",
}
if params.Challenge != nil {
mp["challenge"] = *params.Challenge
mp["type"] = "challenge"
}
if params.Location != nil {
mp["location"] = *params.Location
Expand Down

0 comments on commit f37111d

Please sign in to comment.