mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
Refactor API endpoints to use '/api/lm/' prefix
- Updated all relevant routes in `stats_routes.py` and `update_routes.py` to include the new '/api/lm/' prefix for consistency. - Modified API endpoint configurations in `apiConfig.js` to reflect the new structure, ensuring all CRUD and bulk operations are correctly routed. - Adjusted fetch calls in various components and managers to utilize the updated API paths, including recipe, model, and example image operations. - Ensured all instances of the old API paths were replaced with the new '/api/lm/' prefix across the codebase for uniformity and to prevent broken links.
This commit is contained in:
@@ -38,7 +38,7 @@ app.registerExtension({
|
||||
async updateUsageStats(promptId) {
|
||||
try {
|
||||
// Call backend endpoint with the prompt_id
|
||||
const response = await fetch(`/api/update-usage-stats`, {
|
||||
const response = await fetch(`/api/lm/update-usage-stats`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -79,7 +79,7 @@ app.registerExtension({
|
||||
}
|
||||
}
|
||||
|
||||
const response = await fetch('/api/register-nodes', {
|
||||
const response = await fetch('/api/lm/register-nodes', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -158,7 +158,7 @@ app.registerExtension({
|
||||
|
||||
try {
|
||||
// Search for current relative path
|
||||
const response = await api.fetchApi(`/${modelType}/relative-paths?search=${encodeURIComponent(fileName)}&limit=2`);
|
||||
const response = await api.fetchApi(`/lm/${modelType}/relative-paths?search=${encodeURIComponent(fileName)}&limit=2`);
|
||||
const data = await response.json();
|
||||
|
||||
if (!data.success || !data.relative_paths || data.relative_paths.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user