mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-21 23:41:28 +08:00
Merge branch 'master' of github.com:comfyanonymous/ComfyUI
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import logging
|
||||
from typing import Optional
|
||||
|
||||
from aiohttp import web
|
||||
|
||||
from ...services.file_service import FileService
|
||||
from ....cmd.folder_paths import models_dir, user_directory, output_directory
|
||||
from ....cmd.folder_paths import models_dir, user_directory, output_directory, folder_names_and_paths
|
||||
|
||||
|
||||
class InternalRoutes:
|
||||
@@ -41,6 +40,13 @@ class InternalRoutes:
|
||||
# todo: applications really shouldn't serve logs like this
|
||||
return web.json_response({})
|
||||
|
||||
@self.routes.get('/folder_paths')
|
||||
async def get_folder_paths(request):
|
||||
response = {}
|
||||
for key in folder_names_and_paths:
|
||||
response[key] = folder_names_and_paths[key][0]
|
||||
return web.json_response(response)
|
||||
|
||||
def get_app(self):
|
||||
if self._app is None:
|
||||
self._app = web.Application()
|
||||
|
||||
Reference in New Issue
Block a user