Refactor Attchemnt Upload and fix bug with signing
This commit is contained in:
@@ -138,6 +138,13 @@ class ApiClient {
|
||||
} catch (e) {
|
||||
console.error('Error clearing offline data on logout', e)
|
||||
}
|
||||
try {
|
||||
// Dynamic import sidesteps the ApiClient <-> ImageCache module cycle
|
||||
const { clearImageCache } = await import('./ImageCache')
|
||||
await clearImageCache()
|
||||
} catch (e) {
|
||||
console.error('Error clearing image cache on logout', e)
|
||||
}
|
||||
try {
|
||||
await logout()
|
||||
} catch (e) {
|
||||
@@ -252,7 +259,7 @@ class ApiClient {
|
||||
}
|
||||
|
||||
return this.request(endpoint, {
|
||||
options: { ...options },
|
||||
...options,
|
||||
method: 'POST',
|
||||
body: data ? data : undefined,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user