fix: server port settings has lifecycle

This commit is contained in:
Carlos Valente
2026-03-21 20:56:52 +01:00
committed by Carlos Valente
parent ef5c0a371e
commit d8cef11a25
4 changed files with 59 additions and 23 deletions
+1
View File
@@ -3,6 +3,7 @@ import { serverURL } from '../../externals';
// keys in tanstack store
export const APP_INFO = ['appinfo'];
export const APP_SETTINGS = ['appSettings'];
export const APP_SERVER_PORT = ['appServerPort'];
export const APP_VERSION = ['appVersion'];
export const AUTOMATION = ['automation'];
export const CUSTOM_FIELDS = ['customFields'];
+2 -2
View File
@@ -31,8 +31,8 @@ export async function postShowWelcomeDialog(show: boolean) {
/**
* HTTP request to retrieve server port
*/
export async function getServerPort(): Promise<PortInfo> {
const res = await axios.get(`${settingsPath}/serverport`);
export async function getServerPort(options?: RequestOptions): Promise<PortInfo> {
const res = await axios.get(`${settingsPath}/serverport`, { signal: options?.signal });
return res.data;
}