modified: backend/src/server.ts
modified: frontend/src/App.tsx modified: frontend/src/components/Sidebar.tsx modified: frontend/src/services/api.ts
This commit is contained in:
@@ -88,7 +88,7 @@ app.use('/api/databases', databaseRoutes);
|
|||||||
app.use('/api/db-management', databaseManagementRoutes);
|
app.use('/api/db-management', databaseManagementRoutes);
|
||||||
app.use('/api/users', userRoutes);
|
app.use('/api/users', userRoutes);
|
||||||
app.use('/api/logs', logsRoutes);
|
app.use('/api/logs', logsRoutes);
|
||||||
app.use('/api/sql', sqlInterfaceRoutes);
|
app.use('/api/workbench', sqlInterfaceRoutes);
|
||||||
|
|
||||||
// Dynamic API routes (user-created endpoints)
|
// Dynamic API routes (user-created endpoints)
|
||||||
app.use('/api/v1', dynamicRoutes);
|
app.use('/api/v1', dynamicRoutes);
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ function App() {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="/sql"
|
path="/workbench"
|
||||||
element={
|
element={
|
||||||
<PrivateRoute>
|
<PrivateRoute>
|
||||||
<Layout>
|
<Layout>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { cn } from '@/utils/cn';
|
|||||||
|
|
||||||
const navItems = [
|
const navItems = [
|
||||||
{ to: '/', icon: Home, label: 'Главная' },
|
{ to: '/', icon: Home, label: 'Главная' },
|
||||||
{ to: '/sql', icon: Database, label: 'SQL интерфейс' },
|
{ to: '/workbench', icon: Database, label: 'SQL интерфейс' },
|
||||||
{ to: '/endpoints', icon: FileCode, label: 'Эндпоинты' },
|
{ to: '/endpoints', icon: FileCode, label: 'Эндпоинты' },
|
||||||
{ to: '/folders', icon: Folder, label: 'Папки' },
|
{ to: '/folders', icon: Folder, label: 'Папки' },
|
||||||
{ to: '/api-keys', icon: Key, label: 'API Ключи' },
|
{ to: '/api-keys', icon: Key, label: 'API Ключи' },
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ export interface SqlQueryResult {
|
|||||||
|
|
||||||
export const sqlInterfaceApi = {
|
export const sqlInterfaceApi = {
|
||||||
execute: (databaseId: string, query: string) =>
|
execute: (databaseId: string, query: string) =>
|
||||||
api.post<SqlQueryResult>('/sql/execute', { database_id: databaseId, query }),
|
api.post<SqlQueryResult>('/workbench/execute', { database_id: databaseId, query }),
|
||||||
};
|
};
|
||||||
|
|
||||||
export default api;
|
export default api;
|
||||||
|
|||||||
Reference in New Issue
Block a user