mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-10 06:34:24 +08:00
feat: add api - /snapshot/get_current
This commit is contained in:
parent
8363a80c48
commit
7b0bce916e
@ -19,7 +19,7 @@ from server import PromptServer
|
||||
from .glob import manager_core as core
|
||||
import cm_global
|
||||
|
||||
version = [2, 18, 4]
|
||||
version = [2, 19]
|
||||
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
||||
|
||||
@ -541,6 +541,12 @@ async def fetch_externalmodel_list(request):
|
||||
return web.json_response(json_obj, content_type='application/json')
|
||||
|
||||
|
||||
@PromptServer.instance.routes.get("/snapshot/get_current")
|
||||
async def get_snapshot_list(request):
|
||||
json_obj = get_current_snapshot()
|
||||
return web.json_response(json_obj, content_type='application/json')
|
||||
|
||||
|
||||
@PromptServer.instance.routes.get("/snapshot/getlist")
|
||||
async def get_snapshot_list(request):
|
||||
snapshots_directory = os.path.join(os.path.dirname(__file__), 'snapshots')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user