mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
wrap all internal api calls with auth check and use token when possible
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -164,7 +164,7 @@ async function initModels() {
|
||||
const el = gradioApp().getElementById('main_info');
|
||||
const en = gradioApp().getElementById('txt2img_extra_networks');
|
||||
if (!el || !en) return;
|
||||
const req = await fetch(`${window.api}/sd-models`);
|
||||
const req = await authFetch(`${window.api}/sd-models`);
|
||||
const res = req.ok ? await req.json() : [];
|
||||
log('initModels', res.length);
|
||||
const ready = () => `
|
||||
|
||||
Reference in New Issue
Block a user