From f37111db36fc485e075c11ec877850a3d5c1603b Mon Sep 17 00:00:00 2001 From: Lucas TESSON Date: Sun, 2 Jun 2024 21:26:32 +0200 Subject: [PATCH] fix(files): deduce file type from parameters --- api/files.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/files.go b/api/files.go index f92031d..f97a84d 100644 --- a/api/files.go +++ b/api/files.go @@ -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