summaryrefslogtreecommitdiff
path: root/neocities
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2023-09-30 22:39:48 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2023-10-02 21:48:41 +0200
commit83bc473966e4a2dfbc1aaab4e398adb10e5491fc (patch)
tree9cffd13f1fe9f3171a162fabbb5e21522501308d /neocities
parent6881ace0c44fabc3baee85b930bd8c2147f3c8bb (diff)
api: add neocities-success?
Diffstat (limited to 'neocities')
-rw-r--r--neocities/api.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/neocities/api.scm b/neocities/api.scm
index a2017a7..83f2afe 100644
--- a/neocities/api.scm
+++ b/neocities/api.scm
@@ -36,6 +36,7 @@
neocities-list
neocities-key
neocities-upload
+ neocities-success?
))
(define-record-type <neocities-auth-api-key>
@@ -125,3 +126,6 @@
#:content-type (string-append "multipart/form-data; boundary=" boundary)
#:body body
#:auth (encode-auth (neocities-api-auth api))))))
+
+(define (neocities-success? response)
+ (string=? (assoc-ref response "result") "success"))