f8283729ba
* refactor: replace jobs proxy with local controller and optimize model loading - Add local jobs controller that directly fetches upstream gateway with profile support and 30s timeout, replacing unreliable proxy catch-all - Upstream errors (non-200) return 502 instead of leaking to frontend - Switch loadModels() from fetchAvailableModels (slow, fetches all provider APIs) to fetchConfigModels (reads config.yaml only) - Hide logo dance video in sidebar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: resolve TypeScript errors from previous refactor - Remove unused imports (danceVideo, useTheme) in AppSidebar - Map ConfigModelsResponse.groups to AvailableModelGroup[] format Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
14 lines
544 B
TypeScript
14 lines
544 B
TypeScript
import Router from '@koa/router'
|
|
import * as ctrl from '../../controllers/hermes/jobs'
|
|
|
|
export const jobRoutes = new Router()
|
|
|
|
jobRoutes.get('/api/hermes/jobs', ctrl.list)
|
|
jobRoutes.get('/api/hermes/jobs/:id', ctrl.get)
|
|
jobRoutes.post('/api/hermes/jobs', ctrl.create)
|
|
jobRoutes.patch('/api/hermes/jobs/:id', ctrl.update)
|
|
jobRoutes.delete('/api/hermes/jobs/:id', ctrl.remove)
|
|
jobRoutes.post('/api/hermes/jobs/:id/pause', ctrl.pause)
|
|
jobRoutes.post('/api/hermes/jobs/:id/resume', ctrl.resume)
|
|
jobRoutes.post('/api/hermes/jobs/:id/run', ctrl.run)
|