Skip to content

Commit

Permalink
feat(core): Add the search method to the adapter
Browse files Browse the repository at this point in the history
This update was really simple, because we dont need any kind of aliasing
due to fastify and express already supporting the search method for Application
  • Loading branch information
Gustrb committed Nov 9, 2022
1 parent 2dd3526 commit 2f69e96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -363,7 +363,6 @@ describe('@Search', () => {

const path = Reflect.getMetadata('path', Test.test);
const pathUsingArray = Reflect.getMetadata('path', Test.testUsingArray);

expect(path).to.be.eql('/');
expect(pathUsingArray).to.be.eql('/');
});
Expand Down
6 changes: 6 additions & 0 deletions packages/core/adapters/http-adapter.ts
Expand Up @@ -68,6 +68,12 @@ export abstract class AbstractHttpAdapter<
return this.instance.all(...args);
}

public search(port: string | number, callback?: () => void);
public search(port: string | number, hostname: string, callback?: () => void);
public search(port: any, hostname?: any, callback?: any) {
return this.instance.search(port, hostname, callback);
}

public options(handler: RequestHandler);
public options(path: any, handler: RequestHandler);
public options(...args: any[]) {
Expand Down

0 comments on commit 2f69e96

Please sign in to comment.