mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-22 05:32:12 -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
|
||||
def setup_routes(app):
|
||||
"""Register miscellaneous routes"""
|
||||
app.router.add_get('/api/settings', MiscRoutes.get_settings)
|
||||
app.router.add_post('/api/settings', MiscRoutes.update_settings)
|
||||
app.router.add_get('/api/lm/settings', MiscRoutes.get_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'}))
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ export class OnboardingManager {
|
||||
setStorageItem('settings', state.global.settings);
|
||||
|
||||
// Save to backend
|
||||
const response = await fetch('/api/settings', {
|
||||
const response = await fetch('/api/lm/settings', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@@ -97,7 +97,7 @@ export class SettingsManager {
|
||||
|
||||
async syncSettingsFromBackend() {
|
||||
try {
|
||||
const response = await fetch('/api/settings');
|
||||
const response = await fetch('/api/lm/settings');
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
@@ -213,7 +213,7 @@ export class SettingsManager {
|
||||
const payload = {};
|
||||
payload[settingKey] = value;
|
||||
|
||||
const response = await fetch('/api/settings', {
|
||||
const response = await fetch('/api/lm/settings', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -1274,7 +1274,7 @@ export class SettingsManager {
|
||||
const payload = {};
|
||||
payload[settingKey] = '__DELETE__';
|
||||
|
||||
const response = await fetch('/api/settings', {
|
||||
const response = await fetch('/api/lm/settings', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user