Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

函数 api 无法使用 Guard  #425

@mengxiong10

Description

@mengxiong10

使用函数Api 只能把元数据设置到 runner,不能把元数据设置到 FunctionContainer 上里面, , 导致守卫函数里面获取不到元数据

@Guard()
export class AuthGuard implements IGuard<Context> {
  async canActivate(context: Context, FunctionContainer, methodName: string): Promise<boolean> {
     getPropertyMetadata<string[]>('key', FunctionContainer, methodName);
  }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions