forked from extern/easydiffusion
Fixed output_dir not liking the move to JSONResponse
This commit is contained in:
parent
8fdb1e7ec9
commit
7625e591fe
@ -1497,7 +1497,7 @@ async function getDiskPath() {
|
|||||||
let res = await fetch('/get/output_dir')
|
let res = await fetch('/get/output_dir')
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
res = await res.json()
|
res = await res.json()
|
||||||
res = res[0]
|
res = res.output_dir
|
||||||
|
|
||||||
document.querySelector('#diskPath').value = res
|
document.querySelector('#diskPath').value = res
|
||||||
}
|
}
|
||||||
|
@ -263,7 +263,7 @@ def read_web_data(key:str=None):
|
|||||||
elif key == 'models':
|
elif key == 'models':
|
||||||
return JSONResponse(getModels(), headers=NOCACHE_HEADERS)
|
return JSONResponse(getModels(), headers=NOCACHE_HEADERS)
|
||||||
elif key == 'modifiers': return FileResponse(os.path.join(SD_UI_DIR, 'modifiers.json'), headers=NOCACHE_HEADERS)
|
elif key == 'modifiers': return FileResponse(os.path.join(SD_UI_DIR, 'modifiers.json'), headers=NOCACHE_HEADERS)
|
||||||
elif key == 'output_dir': return JSONResponse({outpath}, headers=NOCACHE_HEADERS)
|
elif key == 'output_dir': return JSONResponse({ 'output_dir': outpath }, headers=NOCACHE_HEADERS)
|
||||||
else:
|
else:
|
||||||
return HTTPException(status_code=404, detail=f'Request for unknown {key}') # HTTP404 Not Found
|
return HTTPException(status_code=404, detail=f'Request for unknown {key}') # HTTP404 Not Found
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user