Cleanuop and CORS fixing

This commit is contained in:
James Pattinson
2025-10-13 19:30:19 +00:00
parent d37027ee5a
commit ecbc38cf8e
6 changed files with 359 additions and 6 deletions

View File

@@ -50,9 +50,14 @@ class APIClient {
*/
async request(endpoint, options = {}) {
const url = `${this.baseURL}${endpoint}`;
// Merge options, with custom headers taking precedence
const config = {
headers: { ...this.headers },
...options
...options,
headers: {
...this.headers,
...(options.headers || {})
}
};
try {