Refactor AI proxy error handling and remove deprecated upload and event routes

- Updated `getAiProxy` function to return a JSON response for missing objects when the user is the owner.
- Removed the `upload.ts`, `event.ts`, and related middleware files to streamline the codebase.
- Cleaned up `handle-request.ts` and `index.ts` by removing unused imports and routes.
- Deleted chunk upload handling and related utility functions to simplify resource management.
- Enhanced app manager list functionality to support app creation if not found.
This commit is contained in:
2026-02-02 18:06:31 +08:00
parent 82e3392b36
commit 158dd9e85c
14 changed files with 92 additions and 908 deletions

View File

@@ -1,14 +1,13 @@
import { router } from '@/app.ts';
import http from 'http';
import { useContextKey } from '@kevisual/context';
import { checkAuth, error } from './middleware/auth.ts';
export { router, checkAuth, error };
export { router, };
/**
* 事件客户端
*/
const eventClientsInit = () => {
const clients = new Map<string, { client?: http.ServerResponse; createTime?: number; [key: string]: any }>();
const clients = new Map<string, { client?: http.ServerResponse; createTime?: number;[key: string]: any }>();
return clients;
};
export const clients = useContextKey('event-clients', () => eventClientsInit());