From 9d4bab5a20b777dc4f56165a9cc2d2c601ffcc8e Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Sun, 22 May 2022 18:12:46 +0200 Subject: [PATCH] Small syntax sugar optimizations --- mattermost.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mattermost.el b/mattermost.el index c59e25c..e0993cc 100644 --- a/mattermost.el +++ b/mattermost.el @@ -40,7 +40,7 @@ (defun mattermost-login (username password) "Log into the Mattermost Server" (let ((url-request-method "POST") - (url-request-extra-headers `(("Content-Type" . "application/json"))) + (url-request-extra-headers '(("Content-Type" . "application/json"))) (url-request-data (json-serialize (list :login_id username :password password)))) (with-current-buffer (url-retrieve-synchronously (concat mattermost-server-url "/api/v4/users/login")) (beginning-of-buffer) @@ -59,7 +59,7 @@ (url-request-extra-headers `(("Content-Type" . "application/json"))) (url-request-data (if body (json-serialize body)))) (if mattermost-token - (add-to-list 'url-request-extra-headers (cons "Authorization" (concat "Bearer " mattermost-token)))) + (add-to-list 'url-request-extra-headers `("Authorization" . ,(concat "Bearer " mattermost-token)))) (with-current-buffer (url-retrieve-synchronously (concat mattermost-server-url "/api/v4" url) t) (mattermost-parse-json))))