branch: elpa/fedi
commit 452b78611448fe9b15b0fe66d9854d0b8b0620db
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>

    http api: opt no-slash arg
---
 fedi-http.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fedi-http.el b/fedi-http.el
index 7423ce422ac..378193bea0a 100644
--- a/fedi-http.el
+++ b/fedi-http.el
@@ -73,11 +73,11 @@ A random one is picked at package initialization.")
 
 ;;; UTILS
 
-(defun fedi-http--api (endpoint &optional url ver-str)
+(defun fedi-http--api (endpoint &optional url ver-str no-slash)
   "Return Fedi API URL for ENDPOINT."
   (concat (or url fedi-instance-url) "/api/"
           (or ver-str fedi-http--api-version)
-          "/" endpoint))
+          (unless no-slash "/") endpoint))
 
 (defun fedi-http--render-html-err (string)
   "Render STRING as HTML in a temp buffer.

Reply via email to