From 8d303276fb37c8f853dfaeee4e0c3c94650ce6b2 Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Thu, 8 Jan 2026 01:14:09 +0100 Subject: [PATCH] fix: add missing patch method to APIClient MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added PATCH request method to the shared APIClient class. The method was missing which caused "apiClient.patch is not a function" error when saving product edits on the vendor-product-edit page. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- static/shared/js/api-client.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/static/shared/js/api-client.js b/static/shared/js/api-client.js index 8ba1e677..1a979c6f 100644 --- a/static/shared/js/api-client.js +++ b/static/shared/js/api-client.js @@ -221,6 +221,21 @@ class APIClient { }); } + /** + * PATCH request + */ + async patch(endpoint, data = {}) { + apiLog.debug('PATCH request data:', { + hasData: !!data, + dataKeys: Object.keys(data) + }); + + return this.request(endpoint, { + method: 'PATCH', + body: JSON.stringify(data) + }); + } + /** * DELETE request */