mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-05-28 23:15:33 +08:00
refactor: make cli-auth part of the providers class
This commit is contained in:
@@ -4,6 +4,7 @@ import { asyncHandler } from '@/shared/http/async-handler.js';
|
||||
import { AppError } from '@/shared/utils/app-error.js';
|
||||
import { createApiErrorResponse, createApiSuccessResponse } from '@/shared/http/api-response.js';
|
||||
import { llmService } from '@/modules/ai-runtime/services/ai-runtime.service.js';
|
||||
import { llmAuthService } from '@/modules/ai-runtime/services/auth.service.js';
|
||||
import { llmSessionsService } from '@/modules/ai-runtime/services/sessions.service.js';
|
||||
import { llmMcpService } from '@/modules/ai-runtime/services/mcp.service.js';
|
||||
import { llmSkillsService } from '@/modules/ai-runtime/services/skills.service.js';
|
||||
@@ -233,6 +234,15 @@ router.get(
|
||||
}),
|
||||
);
|
||||
|
||||
router.get(
|
||||
'/providers/:provider/auth/status',
|
||||
asyncHandler(async (req: Request, res: Response) => {
|
||||
const provider = parseProvider(req.params.provider);
|
||||
const auth = await llmAuthService.getProviderAuthStatus(provider);
|
||||
res.json(createApiSuccessResponse({ provider, auth }));
|
||||
}),
|
||||
);
|
||||
|
||||
router.get(
|
||||
'/providers/:provider/sessions',
|
||||
asyncHandler(async (req: Request, res: Response) => {
|
||||
|
||||
Reference in New Issue
Block a user