From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 2153D1FF170 for ; Thu, 10 Jul 2025 15:49:32 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1822535084; Thu, 10 Jul 2025 15:50:17 +0200 (CEST) From: Shannon Sterz To: pbs-devel@lists.proxmox.com Date: Thu, 10 Jul 2025 15:50:07 +0200 Message-Id: <20250710135010.305861-2-s.sterz@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250710135010.305861-1-s.sterz@proxmox.com> References: <20250710135010.305861-1-s.sterz@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.021 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox 1/1] auth-api: include meta information required by extjs in api endpoints X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" otherwise extjs will assume the requests failed even though they were successful. Signed-off-by: Shannon Sterz --- proxmox-auth-api/src/api/access.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/proxmox-auth-api/src/api/access.rs b/proxmox-auth-api/src/api/access.rs index fdf52185..f5111d4a 100644 --- a/proxmox-auth-api/src/api/access.rs +++ b/proxmox-auth-api/src/api/access.rs @@ -6,7 +6,6 @@ use http::Response; use openssl::hash::MessageDigest; use serde_json::{json, Value}; -use proxmox_http::Body; use proxmox_rest_server::{extract_cookie, RestEnvironment}; use proxmox_router::{ http_err, ApiHandler, ApiMethod, ApiResponseFuture, Permission, RpcEnvironment, @@ -93,7 +92,11 @@ fn logout_handler( Ok(Response::builder() .header(hyper::header::SET_COOKIE, host_cookie) - .body(Body::empty())?) + .body( + json!({"data": {}, "status": 200, "success": true }) + .to_string() + .into(), + )?) }) } @@ -179,7 +182,11 @@ fn create_ticket_http_only( } } - Ok(response.body(json!({"data": ticket_response }).to_string().into())?) + Ok(response.body( + json!({"data": ticket_response, "status": 200, "success": true }) + .to_string() + .into(), + )?) }) } -- 2.39.5 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel