mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat: update API endpoints to include '/list' for model retrieval in routes and templates, fixes #344
This commit is contained in:
@@ -38,7 +38,7 @@ class BaseModelRoutes(ABC):
|
||||
prefix: URL prefix (e.g., 'loras', 'checkpoints')
|
||||
"""
|
||||
# Common model management routes
|
||||
app.router.add_get(f'/api/{prefix}', self.get_models)
|
||||
app.router.add_get(f'/api/{prefix}/list', self.get_models)
|
||||
app.router.add_post(f'/api/{prefix}/delete', self.delete_model)
|
||||
app.router.add_post(f'/api/{prefix}/exclude', self.exclude_model)
|
||||
app.router.add_post(f'/api/{prefix}/fetch-civitai', self.fetch_civitai)
|
||||
|
||||
@@ -55,7 +55,7 @@ export function getApiEndpoints(modelType) {
|
||||
|
||||
return {
|
||||
// Base CRUD operations
|
||||
list: `/api/${modelType}`,
|
||||
list: `/api/${modelType}/list`,
|
||||
delete: `/api/${modelType}/delete`,
|
||||
exclude: `/api/${modelType}/exclude`,
|
||||
rename: `/api/${modelType}/rename`,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
{% block init_title %}Initializing Checkpoints Manager{% endblock %}
|
||||
{% block init_message %}Scanning and building checkpoints cache. This may take a few moments...{% endblock %}
|
||||
{% block init_check_url %}/api/checkpoints?page=1&page_size=1{% endblock %}
|
||||
{% block init_check_url %}/api/checkpoints/list?page=1&page_size=1{% endblock %}
|
||||
|
||||
{% block additional_components %}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
{% block init_title %}Initializing Embeddings Manager{% endblock %}
|
||||
{% block init_message %}Scanning and building embeddings cache. This may take a few moments...{% endblock %}
|
||||
{% block init_check_url %}/api/embeddings?page=1&page_size=1{% endblock %}
|
||||
{% block init_check_url %}/api/embeddings/list?page=1&page_size=1{% endblock %}
|
||||
|
||||
{% block additional_components %}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
{% block init_title %}Initializing LoRA Manager{% endblock %}
|
||||
{% block init_message %}Scanning and building LoRA cache. This may take a few minutes...{% endblock %}
|
||||
{% block init_check_url %}/api/loras?page=1&page_size=1{% endblock %}
|
||||
{% block init_check_url %}/api/loras/list?page=1&page_size=1{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'components/controls.html' %}
|
||||
|
||||
Reference in New Issue
Block a user