Open mengxiong10 opened 1 year ago
使用函数Api 只能把元数据设置到 runner,不能把元数据设置到 FunctionContainer 上里面, , 导致守卫函数里面获取不到元数据
Api
runner
FunctionContainer
@Guard() export class AuthGuard implements IGuard<Context> { async canActivate(context: Context, FunctionContainer, methodName: string): Promise<boolean> { getPropertyMetadata<string[]>('key', FunctionContainer, methodName); } }
关于函数中 Guard 的用法我这边看看
使用函数
Api
只能把元数据设置到runner
,不能把元数据设置到FunctionContainer
上里面, , 导致守卫函数里面获取不到元数据