egg-shell-decorators icon indicating copy to clipboard operation
egg-shell-decorators copied to clipboard

给EggShell增加通过path获取original target的能力,便于中间件获取对应metaData

Open tswordyao opened this issue 5 years ago • 2 comments

// 当eggShell获得path并交给router处理时,顺便登记到map中,并返回get方法.

import {getRouterTarget} from 'egg-shell-decorators';

// 通过此方法,middleware中能通过path得到target, 进而得到metadata

const [target,property] = getRouterTarget(ctx.path, ctx.request.method);

tswordyao avatar Sep 16 '19 14:09 tswordyao

Enhancements to this feature are necessary. Otherwise other custom decorators can't get metadata to do their own thing.

brizer avatar Sep 29 '19 12:09 brizer

What's going on?

brizer avatar Jul 27 '22 05:07 brizer