summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--neocities/api.scm2
-rw-r--r--neocities/requests.scm10
2 files changed, 6 insertions, 6 deletions
diff --git a/neocities/api.scm b/neocities/api.scm
index 83f2afe..a0788e7 100644
--- a/neocities/api.scm
+++ b/neocities/api.scm
@@ -79,7 +79,7 @@
(let ((url (neocities-url "delete"
#:port (neocities-api-port api)
#:hostname (neocities-api-hostname api)
- #:querystring `(("files" . ,files)))))
+ #:querystring `(("filenames[]" . ,files)))))
(neocities-request
'POST
url
diff --git a/neocities/requests.scm b/neocities/requests.scm
index 3f06a47..265ebcd 100644
--- a/neocities/requests.scm
+++ b/neocities/requests.scm
@@ -50,14 +50,14 @@
(string-join
(map (lambda (x)
(let ((key (car x))
- (value (cadr x)))
- (if (list? value)
+ (value (cdr x)))
+ (if (= 1 (length value))
+ (string-append (uri-encode key) "=" (uri-encode (car value)))
(string-join
(map (lambda (y)
- (string-append (uri-encode key) "[]=" (uri-encode y)))
+ (string-append (uri-encode key) "=" (uri-encode y)))
value)
- "&")
- (string-append (uri-encode key) "=" (uri-encode value)))))
+ "&"))))
querystring)
"&"))