From cfb3f067eb00306caca5710430bfd76640e344b2 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Tue, 10 Oct 2023 00:39:58 +0200
Subject: api: add port to all urls

---
 neocities/api.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/neocities/api.scm b/neocities/api.scm
index a0788e7..303fb83 100644
--- a/neocities/api.scm
+++ b/neocities/api.scm
@@ -88,6 +88,7 @@
 
 (define* (neocities-list api #:optional path)
   (let ((url (neocities-url "list"
+                            #:port (neocities-api-port api)
                             #:hostname (neocities-api-hostname api)
                             #:querystring (if path `(("path" ,path)) '()))))
     (neocities-request
@@ -98,6 +99,7 @@
 (define* (neocities-info api #:optional sitename)
   ;; It can be unauthenticated, but this is only the authenticated version
   (let ((url (neocities-url "info"
+                            #:port (neocities-api-port api)
                             #:hostname (neocities-api-hostname api)
                             #:querystring (if sitename
                                             `(("sitename" ,sitename))
@@ -109,6 +111,7 @@
 
 (define* (neocities-key api)
   (let ((url (neocities-url "key"
+                            #:port (neocities-api-port api)
                             #:hostname (neocities-api-hostname api))))
     (neocities-request
       'GET
@@ -118,6 +121,7 @@
 (define* (neocities-upload api files)
   "files is an alist with the filename and destination"
   (let ((url (neocities-url "upload"
+                            #:port (neocities-api-port api)
                             #:hostname (neocities-api-hostname api))))
     (let-values (((boundary body) (encode-multipart-body files)))
       (neocities-request
-- 
cgit v1.2.3