@tsed/platform-koa
Version:
Koa package for Ts.ED framework
27 lines (26 loc) • 459 B
JavaScript
import { UseParam } from "@tsed/platform-params";
/**
* Return the original Koa context.
* @decorator
* @operation
* @input
* @koa
*/
export function KoaCtx() {
return UseParam({
paramType: "KOA_CTX",
dataPath: "$ctx.request.ctx",
useMapper: false,
useValidation: false
});
}
/**
* Return the original Koa context.
* @decorator
* @operation
* @input
* @koa
*/
export function Ctx() {
return KoaCtx();
}