From 9d4e8f2b840a5cd54bcf16fd9c1b30bea26da56a Mon Sep 17 00:00:00 2001 From: relhamdi Date: Wed, 3 Jun 2026 11:27:45 +0200 Subject: [PATCH] Extract API_ROOT const --- web/constants.js | 1 + web/style_loader.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/constants.js b/web/constants.js index 3554379..b724cee 100644 --- a/web/constants.js +++ b/web/constants.js @@ -1,3 +1,4 @@ +export const API_ROOT = "/re-customutils"; export const EMPTY_VALUE = "--"; export const COLORS = { diff --git a/web/style_loader.js b/web/style_loader.js index 1a858de..6e10664 100644 --- a/web/style_loader.js +++ b/web/style_loader.js @@ -1,4 +1,4 @@ -import { EMPTY_VALUE } from "./constants.js"; +import { API_ROOT, EMPTY_VALUE } from "./constants.js"; import { findWidget, registerNode, waitForWidgets } from "./utils.js"; import { ButtonRowWidget } from "./widgets/button_row_widget.js"; import { LoraRowWidget } from "./widgets/lora_row_widget.js"; @@ -7,7 +7,7 @@ import { LoraRowWidget } from "./widgets/lora_row_widget.js"; const NODE_NAME = "StyleLoader"; -const BASE_ENDPOINT = "/re-customutils/styles"; +const BASE_ENDPOINT = `${API_ROOT}/styles`; const NO_VAE = "none"; const MAX_LORAS = 15; const DEFAULT_LORA_WEIGHT = 0.8;