mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-25 04:54:08 -03:00
feat: support reverse-proxy URL subpaths (llama-swap, SwarmUI) (#1122)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// ComfyUI extension to track model usage statistics
|
||||
import { app } from "../../scripts/app.js";
|
||||
import { api } from "../../scripts/api.js";
|
||||
import { lmUrl } from "./base_path.js";
|
||||
import { showToast } from "./utils.js";
|
||||
import { getAutoPathCorrectionPreference, getUsageStatisticsPreference } from "./settings.js";
|
||||
|
||||
@@ -40,7 +41,7 @@ app.registerExtension({
|
||||
async updateUsageStats(promptId) {
|
||||
try {
|
||||
// Call backend endpoint with the prompt_id
|
||||
const response = await fetch(`/api/lm/update-usage-stats`, {
|
||||
const response = await fetch(lmUrl(`/api/lm/update-usage-stats`), {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user