renamed routes to use same path

This commit is contained in:
Kelly Jerrell
2025-07-02 09:01:44 -07:00
parent 55c286b651
commit ee1fbb7295
5 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
from aiohttp import web
from aiohttp.web_request import Request
from server import PromptServer
from server import PromptServer # type: ignore
from .. import cancel_request, settings
from .draw_things import get_files
@@ -8,7 +8,7 @@ from .draw_things import get_files
routes = PromptServer.instance.routes
@routes.post("/dt_grpc_files_info")
@routes.post("/dt_grpc/files_info")
async def handle_files_info_request(request):
"""
Returns a list of all files on the Draw Things gRPC server.
@@ -35,7 +35,7 @@ async def handle_files_info_request(request):
)
@routes.post("/dt_grpc_preview")
@routes.post("/dt_grpc/preview")
async def handle_preview_request(request):
"""
Toggles the preview mode on or off.
@@ -49,7 +49,7 @@ async def handle_preview_request(request):
return web.json_response()
@routes.post("/dt_grpc_interrupt")
@routes.post("/dt_grpc/interrupt")
async def handle_interrupt_request(request):
"""
Handles interrupt requests to the gRPC server by setting the cancel request flag.
+2 -2
View File
@@ -59,7 +59,7 @@ export default {
// if the prompt is cancelled, send a signal to the server to cancel the grpc request
setCallback(app.api, "interrupt", async (e) => {
if (app.graph.nodes.some(n => n.type === "DrawThingsSampler")) {
await app.api.fetchApi(`/dt_grpc_interrupt`, {
await app.api.fetchApi(`/dt_grpc/interrupt`, {
method: "POST",
})
}
@@ -201,7 +201,7 @@ async function updatePreviewSetting() {
const body = new FormData()
body.append("preview", previewMethod)
await api.fetchApi(`/dt_grpc_preview`, {
await api.fetchApi(`/dt_grpc/preview`, {
method: "POST",
body,
})
+1 -1
View File
@@ -55,7 +55,7 @@ app.registerExtension({
}
}
injectCss("extensions/drawthings-grpc/dtGrpc.css")
injectCss("extensions/drawthings-grpc/drawThings.css")
},
settings: modules.flatMap(m => m.settings ?? []),
+1 -1
View File
@@ -106,7 +106,7 @@ export async function getFiles(server, port, useTls) {
const api = window.comfyAPI.api.api
const filesInfoResponse = await api.fetchApi(`/dt_grpc_files_info`, {
const filesInfoResponse = await api.fetchApi(`/dt_grpc/files_info`, {
method: "POST",
body,
})