Skip to content

Commit

Permalink
fix(rabbitmq): deprecated methode scanFromPrototype
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdijz5 committed Apr 2, 2024
1 parent 450d420 commit e8eba5a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/discovery/src/discovery.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class DiscoveryService {
constructor(
private readonly modulesContainer: ModulesContainer,
private readonly metadataScanner: MetadataScanner
) {}
) { }

/**
* Discovers all providers in a Nest App that match a filter
Expand Down Expand Up @@ -168,11 +168,9 @@ export class DiscoveryService {

const prototype = Object.getPrototypeOf(instance);

return this.metadataScanner
.scanFromPrototype(instance, prototype, (name) =>
this.extractMethodMetaAtKey<T>(metaKey, component, prototype, name)
)
.filter((x) => !isNil(x.meta));
return this.metadataScanner.getAllMethodNames(prototype).map((name) =>
this.extractMethodMetaAtKey<T>(metaKey, component, prototype, name)
).filter((x) => !isNil(x.meta));
}

/**
Expand Down

0 comments on commit e8eba5a

Please sign in to comment.