adminforth 2.13.0-next.60 → 2.13.0-next.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/spa/src/utils.ts +4 -3
- package/package.json +1 -1
package/dist/spa/src/utils.ts
CHANGED
|
@@ -71,14 +71,15 @@ export async function callApi({path, method, body, headers, silentError = false}
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
export async function callAdminForthApi({ path, method, body=undefined, headers=undefined }: {
|
|
74
|
+
export async function callAdminForthApi({ path, method, body=undefined, headers=undefined, silentError = false }: {
|
|
75
75
|
path: string,
|
|
76
76
|
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH',
|
|
77
77
|
body?: any,
|
|
78
|
-
headers?: Record<string, string
|
|
78
|
+
headers?: Record<string, string>,
|
|
79
|
+
silentError?: boolean
|
|
79
80
|
}): Promise<any> {
|
|
80
81
|
try {
|
|
81
|
-
return callApi({path: `/adminapi/v1${path}`, method, body} );
|
|
82
|
+
return callApi({path: `/adminapi/v1${path}`, method, body, headers, silentError} );
|
|
82
83
|
} catch (e) {
|
|
83
84
|
console.error('error', e);
|
|
84
85
|
return { error: `Unexpected error: ${e}` };
|