@adonisjs/http-server
Advanced tools
Comparing version 6.8.2-1 to 6.8.2-2
@@ -26,3 +26,3 @@ import Macroable from '@poppinss/macroable'; | ||
redirect(identifier, params, options) { | ||
return this.setHandler(async (ctx) => { | ||
return this.setHandler(async function redirectsToRoute(ctx) { | ||
const redirector = ctx.response.redirect(); | ||
@@ -36,3 +36,3 @@ if (options?.status) { | ||
redirectToPath(url, options) { | ||
return this.setHandler(async (ctx) => { | ||
return this.setHandler(async function redirectsToPath(ctx) { | ||
const redirector = ctx.response.redirect(); | ||
@@ -39,0 +39,0 @@ if (options?.status) { |
@@ -32,4 +32,4 @@ import type { Encryption } from '@adonisjs/encryption'; | ||
group(callback: () => void): RouteGroup; | ||
resource(resource: string, controller: string): RouteResource; | ||
shallowResource(resource: string, controller: string): RouteResource; | ||
resource(resource: string, controller: string | LazyImport<Constructor<any>> | Constructor<any>): RouteResource; | ||
shallowResource(resource: string, controller: string | LazyImport<Constructor<any>> | Constructor<any>): RouteResource; | ||
on(pattern: string): BriskRoute; | ||
@@ -36,0 +36,0 @@ where(param: string, matcher: RouteMatcher | string | RegExp): this; |
import Macroable from '@poppinss/macroable'; | ||
import type { Application } from '@adonisjs/application'; | ||
import { Route } from './route.js'; | ||
import type { Constructor, LazyImport } from '../types/base.js'; | ||
import type { ParsedGlobalMiddleware } from '../types/middleware.js'; | ||
@@ -11,3 +12,3 @@ import type { ResourceActionNames, RouteMatcher, RouteMatchers } from '../types/route.js'; | ||
resource: string; | ||
controller: string; | ||
controller: string | LazyImport<Constructor<any>> | Constructor<any>; | ||
globalMatchers: RouteMatchers; | ||
@@ -14,0 +15,0 @@ shallow: boolean; |
@@ -45,3 +45,5 @@ import string from '@poppinss/utils/string'; | ||
methods, | ||
handler: `${this.#controller}.${action}`, | ||
handler: typeof this.#controller === 'string' | ||
? `${this.#controller}.${action}` | ||
: [this.#controller, action], | ||
globalMatchers: this.#globalMatchers, | ||
@@ -48,0 +50,0 @@ }); |
{ | ||
"name": "@adonisjs/http-server", | ||
"version": "6.8.2-1", | ||
"version": "6.8.2-2", | ||
"description": "AdonisJS HTTP server with support packed with Routing and Cookies", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
148904
3880