mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-01-26 19:19:57 +00:00
Return dict instead of array for clarity
This commit is contained in:
@@ -594,6 +594,8 @@ def api_tac(_: gr.Blocks, app: FastAPI):
|
||||
try:
|
||||
if get:
|
||||
ret = func()
|
||||
if ret is list:
|
||||
ret = [{"name": t[0], "type": t[1], "count": t[2]} for t in ret]
|
||||
return JSONResponse({"result": ret})
|
||||
else:
|
||||
func()
|
||||
|
||||
Reference in New Issue
Block a user