fix scheduler api

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-01-02 16:45:08 -05:00
parent 94a659ee1f
commit 9f30abbad5
5 changed files with 17 additions and 10 deletions
+4
View File
@@ -99,6 +99,10 @@ class Api:
# gallery api
gallery.register_api(app)
# compatibility api
self.text2imgapi = self.generate.post_text2img
self.img2imgapi = self.generate.post_img2img
def add_api_route(self, path: str, endpoint, **kwargs):
if (shared.cmd_opts.auth or shared.cmd_opts.auth_file) and shared.cmd_opts.api_only:
return self.app.add_api_route(path, endpoint, dependencies=[Depends(self.auth)], **kwargs)