mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-05-01 18:28:38 +00:00
refactor: move project rename to module
This commit is contained in:
@@ -19,7 +19,6 @@ import { getConnectableHost } from '../shared/networkHosts.js';
|
||||
|
||||
import { findAppRoot, getModuleDir } from './utils/runtime-paths.js';
|
||||
import {
|
||||
renameProjectById,
|
||||
deleteSessionById,
|
||||
deleteProjectById,
|
||||
getProjectPathById,
|
||||
@@ -302,17 +301,6 @@ app.post('/api/system/update', authenticateToken, async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
// Rename project endpoint; stores the custom name on the DB row for `projectId`.
|
||||
app.put('/api/projects/:projectId/rename', authenticateToken, async (req, res) => {
|
||||
try {
|
||||
const { displayName } = req.body;
|
||||
await renameProjectById(req.params.projectId, displayName);
|
||||
res.json({ success: true });
|
||||
} catch (error) {
|
||||
res.status(500).json({ error: error.message });
|
||||
}
|
||||
});
|
||||
|
||||
// Delete session endpoint; resolves `projectId` to path before touching disk.
|
||||
app.delete('/api/projects/:projectId/sessions/:sessionId', authenticateToken, async (req, res) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user