diff --git a/frontend/src/app.d.ts b/frontend/src/app.d.ts index fe8b593..b2c6e13 100644 --- a/frontend/src/app.d.ts +++ b/frontend/src/app.d.ts @@ -22,6 +22,12 @@ declare global { is_available: boolean; nettype: string; } + + interface ApiResponse { + status: string; + message: string; + data: null | object | object[]; + } } export {}; diff --git a/frontend/src/routes/(front)/add-node/+page.svelte b/frontend/src/routes/(front)/add-node/+page.svelte index ff41a13..d4188ea 100644 --- a/frontend/src/routes/(front)/add-node/+page.svelte +++ b/frontend/src/routes/(front)/add-node/+page.svelte @@ -2,17 +2,10 @@ import { invalidateAll, goto } from '$app/navigation'; import { apiUri } from '$lib/utils/common'; import { ProgressBar } from '@skeletonlabs/skeleton'; + /** @type {import('./$types').PageData} */ export let data; - - /** - * @typedef formResult - * @type {object} - * @property {string} status - * @property {string} message - * @property {null | object} data - */ - /** @type {formResult} */ + /** @type {ApiResponse} */ export let formResult; let isProcessing = false; @@ -31,7 +24,6 @@ isProcessing = false; if (formResult.status === 'ok') { - // rerun all `load` functions, following the successful update await invalidateAll(); goto('/remote-nodes'); }