mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
refactor(routes): update API endpoints for settings to use '/api/lm/settings', see #435
This commit is contained in:
@@ -88,8 +88,8 @@ class MiscRoutes:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def setup_routes(app):
|
def setup_routes(app):
|
||||||
"""Register miscellaneous routes"""
|
"""Register miscellaneous routes"""
|
||||||
app.router.add_get('/api/settings', MiscRoutes.get_settings)
|
app.router.add_get('/api/lm/settings', MiscRoutes.get_settings)
|
||||||
app.router.add_post('/api/settings', MiscRoutes.update_settings)
|
app.router.add_post('/api/lm/settings', MiscRoutes.update_settings)
|
||||||
|
|
||||||
app.router.add_get('/api/health-check', lambda request: web.json_response({'status': 'ok'}))
|
app.router.add_get('/api/health-check', lambda request: web.json_response({'status': 'ok'}))
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ export class OnboardingManager {
|
|||||||
setStorageItem('settings', state.global.settings);
|
setStorageItem('settings', state.global.settings);
|
||||||
|
|
||||||
// Save to backend
|
// Save to backend
|
||||||
const response = await fetch('/api/settings', {
|
const response = await fetch('/api/lm/settings', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export class SettingsManager {
|
|||||||
|
|
||||||
async syncSettingsFromBackend() {
|
async syncSettingsFromBackend() {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/api/settings');
|
const response = await fetch('/api/lm/settings');
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
throw new Error(`HTTP error! status: ${response.status}`);
|
||||||
}
|
}
|
||||||
@@ -213,7 +213,7 @@ export class SettingsManager {
|
|||||||
const payload = {};
|
const payload = {};
|
||||||
payload[settingKey] = value;
|
payload[settingKey] = value;
|
||||||
|
|
||||||
const response = await fetch('/api/settings', {
|
const response = await fetch('/api/lm/settings', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
@@ -1274,7 +1274,7 @@ export class SettingsManager {
|
|||||||
const payload = {};
|
const payload = {};
|
||||||
payload[settingKey] = '__DELETE__';
|
payload[settingKey] = '__DELETE__';
|
||||||
|
|
||||||
const response = await fetch('/api/settings', {
|
const response = await fetch('/api/lm/settings', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
Reference in New Issue
Block a user