- /api (Newznab: caps, search, tvsearch, movie, music, book, get) for Prowlarr, Sonarr and Radarr: voyager 1's controller and XML on the new catalog; readable releases not known to miss files; NEWZNAB_API_KEY. - /api/v1/releases (q, cat, readable, complete, source, poster, size, sort, paging), /api/v1/releases/:id with its files (decoded from the chunks; NzbService.files, shared with the NZB), /api/v1/stats (estimates, plus history and tail progress), /health. Open, as voyager 1's catalog; the web interface uses it. - release_category(name): voyager 1's categorizer without the archive contents, a generated column with a (category, posted_at) index. - @adonisjs/static for the web interface (next). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
51 lines
1.5 KiB
TypeScript
51 lines
1.5 KiB
TypeScript
/*
|
|
|--------------------------------------------------------------------------
|
|
| HTTP kernel file
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The HTTP kernel file is used to register the middleware with the server
|
|
| or the router.
|
|
|
|
|
*/
|
|
|
|
import router from '@adonisjs/core/services/router'
|
|
import server from '@adonisjs/core/services/server'
|
|
|
|
/**
|
|
* The error handler is used to convert an exception
|
|
* to a HTTP response.
|
|
*/
|
|
server.errorHandler(() => import('#exceptions/handler'))
|
|
|
|
/**
|
|
* The server middleware stack runs middleware on all the HTTP
|
|
* requests, even if there is no route registered for
|
|
* the request URL.
|
|
*/
|
|
server.use([
|
|
() => import('#middleware/force_json_response_middleware'),
|
|
() => import('#middleware/container_bindings_middleware'),
|
|
() => import('@adonisjs/cors/cors_middleware'),
|
|
() => import('@adonisjs/static/static_middleware')
|
|
])
|
|
|
|
/**
|
|
* The router middleware stack runs middleware on all the HTTP
|
|
* requests with a registered route.
|
|
*/
|
|
router.use([
|
|
() => import('@adonisjs/core/bodyparser_middleware'),
|
|
() => import('@adonisjs/session/session_middleware'),
|
|
() => import('@adonisjs/shield/shield_middleware'),
|
|
() => import('@adonisjs/auth/initialize_auth_middleware'),
|
|
() => import('#middleware/silent_auth_middleware'),
|
|
])
|
|
|
|
/**
|
|
* Named middleware collection must be explicitly assigned to
|
|
* the routes or the routes group.
|
|
*/
|
|
export const middleware = router.named({
|
|
auth: () => import('#middleware/auth_middleware'),
|
|
})
|