From 8c5db76271a7ca7f4cf39e1910bb23f88cad704e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 9 Mar 2024 15:40:50 +0100 Subject: relay/api: fix error displayed when buffer is not found in POST /api/input --- src/plugins/relay/api/relay-api-protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/relay') diff --git a/src/plugins/relay/api/relay-api-protocol.c b/src/plugins/relay/api/relay-api-protocol.c index bddf9c833..6f75b96f8 100644 --- a/src/plugins/relay/api/relay-api-protocol.c +++ b/src/plugins/relay/api/relay-api-protocol.c @@ -475,11 +475,11 @@ RELAY_API_PROTOCOL_CALLBACK(input) ptr_buffer = weechat_buffer_search ("==", ptr_buffer_name); if (!ptr_buffer) { - cJSON_Delete (json_body); relay_api_msg_send_error_json (client, RELAY_HTTP_404_NOT_FOUND, NULL, "Buffer \"%s\" not found", ptr_buffer_name); + cJSON_Delete (json_body); return WEECHAT_RC_OK; } } -- cgit v1.2.3