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 CCB321FF17C for ; Wed, 23 Jul 2025 17:13:15 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5476516D36; Wed, 23 Jul 2025 17:14:34 +0200 (CEST) From: Shannon Sterz To: pbs-devel@lists.proxmox.com Date: Wed, 23 Jul 2025 17:13:56 +0200 Message-ID: <20250723151356.264229-5-s.sterz@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250723151356.264229-3-s.sterz@proxmox.com> References: <20250723151356.264229-3-s.sterz@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753283660351 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.023 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 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 v2 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 Tested-by: Mira Limbeck Tested-by: Maximiliano Sandoval --- 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.47.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel