fix: add missing patch method to APIClient

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 <noreply@anthropic.com>
This commit is contained in:
2026-01-08 01:14:09 +01:00
parent fa2a3bf89a
commit 8d303276fb

View File

@@ -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
*/