Remove redundant typing in builder API client
This commit is contained in:
parent
61b42d316b
commit
3a51a81e50
|
@ -8,7 +8,7 @@ import { get } from "svelte/store"
|
||||||
import { auth, navigation } from "./stores/portal"
|
import { auth, navigation } from "./stores/portal"
|
||||||
|
|
||||||
export const API = createAPIClient({
|
export const API = createAPIClient({
|
||||||
attachHeaders: (headers: Record<string, string>) => {
|
attachHeaders: headers => {
|
||||||
// Attach app ID header from store
|
// Attach app ID header from store
|
||||||
let appId = get(appStore).appId
|
let appId = get(appStore).appId
|
||||||
if (appId) {
|
if (appId) {
|
||||||
|
@ -22,7 +22,7 @@ export const API = createAPIClient({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onError: (error: any) => {
|
onError: error => {
|
||||||
const { url, message, status, method, handled } = error || {}
|
const { url, message, status, method, handled } = error || {}
|
||||||
|
|
||||||
// Log any errors that we haven't manually handled
|
// Log any errors that we haven't manually handled
|
||||||
|
@ -45,7 +45,7 @@ export const API = createAPIClient({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onMigrationDetected: (appId: string) => {
|
onMigrationDetected: appId => {
|
||||||
const updatingUrl = `/builder/app/updating/${appId}`
|
const updatingUrl = `/builder/app/updating/${appId}`
|
||||||
|
|
||||||
if (window.location.pathname === updatingUrl) {
|
if (window.location.pathname === updatingUrl) {
|
||||||
|
|
Loading…
Reference in New Issue