feat: refactor API routes for renaming models and update related functions

This commit is contained in:
Will Miao
2025-06-25 19:38:38 +08:00
parent 7f523f167d
commit 8931b41c76
10 changed files with 151 additions and 343 deletions

View File

@@ -140,7 +140,7 @@ export async function renameCheckpointFile(filePath, newFileName) {
// Show loading indicator
state.loadingManager.showSimpleLoading('Renaming checkpoint file...');
const response = await fetch('/api/rename_checkpoint', {
const response = await fetch('/api/checkpoints/rename', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -160,7 +160,6 @@ export async function renameCheckpointFile(filePath, newFileName) {
console.error('Error renaming checkpoint file:', error);
throw error;
} finally {
// Hide loading indicator
state.loadingManager.hide();
}
}

View File

@@ -149,7 +149,7 @@ export async function renameLoraFile(filePath, newFileName) {
// Show loading indicator
state.loadingManager.showSimpleLoading('Renaming LoRA file...');
const response = await fetch('/api/rename_lora', {
const response = await fetch('/api/loras/rename', {
method: 'POST',
headers: {
'Content-Type': 'application/json',