Commit 247aeb3a authored by Ryan Voots's avatar Ryan Voots Committed by AUTOMATIC1111
Browse files

Put API under /sdapi/ so that routing is simpler in the future. This means...

Put API under /sdapi/ so that routing is simpler in the future.  This means that one could allow access to /sdapi/ but not the webui.
parent c3851a85
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ class TextToImageResponse(BaseModel):
class Api:
    def __init__(self, app):
        self.router = APIRouter()
        app.add_api_route("/v1/txt2img", self.text2imgapi, methods=["POST"])
        app.add_api_route("/sdapi/v1/txt2img", self.text2imgapi, methods=["POST"])

    def text2imgapi(self, txt2imgreq: StableDiffusionProcessingAPI ):
        populate = txt2imgreq.copy(update={ # Override __init__ params