refactor: Implement download management routes and update API endpoints for LoRA

This commit is contained in:
Will Miao
2025-07-23 16:11:02 +08:00
parent c2e00b240e
commit ea9370443d
6 changed files with 124 additions and 131 deletions

View File

@@ -277,7 +277,7 @@ export async function deleteModel(filePath, modelType = 'lora') {
const endpoint = modelType === 'checkpoint'
? '/api/checkpoints/delete'
: '/api/delete_model';
: '/api/loras/delete';
const response = await fetch(endpoint, {
method: 'POST',
@@ -454,7 +454,7 @@ export async function refreshSingleModelMetadata(filePath, modelType = 'lora') {
const endpoint = modelType === 'checkpoint'
? '/api/checkpoints/fetch-civitai'
: '/api/fetch-civitai';
: '/api/loras/fetch-civitai';
const response = await fetch(endpoint, {
method: 'POST',
@@ -557,7 +557,7 @@ export async function uploadPreview(filePath, file, modelType = 'lora', nsfwLeve
// Set endpoint based on model type
const endpoint = modelType === 'checkpoint'
? '/api/checkpoints/replace-preview'
: '/api/replace_preview';
: '/api/loras/replace_preview';
const response = await fetch(endpoint, {
method: 'POST',