Provided diagnosis is correct had issues because of an improper falsy check (which is why given the choice, I prefere strictly typed languages)
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 32s
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 32s
This commit is contained in:
parent
5fe7028949
commit
be000be1a0
1 changed files with 4 additions and 4 deletions
|
|
@ -104,7 +104,7 @@ export function Controller<T extends { new (...args: any[]): BaseController }>(b
|
||||||
// Loop over all the methods in the decorated class looking for methods that use the GET decorator
|
// Loop over all the methods in the decorated class looking for methods that use the GET decorator
|
||||||
Object.getOwnPropertyNames(target.prototype)
|
Object.getOwnPropertyNames(target.prototype)
|
||||||
// Find all methods that have a Get metadata key (GET decorator)
|
// Find all methods that have a Get metadata key (GET decorator)
|
||||||
.filter((method) => Reflect.getMetadata(GET_METADATA_KEY, target.prototype, method))
|
.filter((method) => typeof Reflect.getMetadata(GET_METADATA_KEY, target.prototype, method) !== 'undefined')
|
||||||
.map((method) => {
|
.map((method) => {
|
||||||
// Get the method
|
// Get the method
|
||||||
let fn = target.prototype[method];
|
let fn = target.prototype[method];
|
||||||
|
|
@ -165,7 +165,7 @@ export function Controller<T extends { new (...args: any[]): BaseController }>(b
|
||||||
// Loop over all the methods in the decorated class looking for methods that use the POST decorator
|
// Loop over all the methods in the decorated class looking for methods that use the POST decorator
|
||||||
Object.getOwnPropertyNames(target.prototype)
|
Object.getOwnPropertyNames(target.prototype)
|
||||||
// Find all methods that have a Post metadata key (POST decorator)
|
// Find all methods that have a Post metadata key (POST decorator)
|
||||||
.filter((method) => Reflect.getMetadata(POST_METADATA_KEY, target.prototype, method))
|
.filter((method) => typeof Reflect.getMetadata(POST_METADATA_KEY, target.prototype, method) !== 'undefined')
|
||||||
.map((method) => {
|
.map((method) => {
|
||||||
// Get the method
|
// Get the method
|
||||||
const fn = target.prototype[method];
|
const fn = target.prototype[method];
|
||||||
|
|
@ -217,7 +217,7 @@ export function Controller<T extends { new (...args: any[]): BaseController }>(b
|
||||||
// Loop over all the methods in the decorated class looking for methods that use the `@PUT` decorator
|
// Loop over all the methods in the decorated class looking for methods that use the `@PUT` decorator
|
||||||
Object.getOwnPropertyNames(target.prototype)
|
Object.getOwnPropertyNames(target.prototype)
|
||||||
// Find all methods that have the associated metadata key (`@PUT` decorator)
|
// Find all methods that have the associated metadata key (`@PUT` decorator)
|
||||||
.filter((method) => Reflect.getMetadata(PUT_METADATA_KEY, target.prototype, method))
|
.filter((method) => typeof Reflect.getMetadata(PUT_METADATA_KEY, target.prototype, method) !== 'undefined')
|
||||||
.map((method) => {
|
.map((method) => {
|
||||||
// Get the method
|
// Get the method
|
||||||
const fn = target.prototype[method];
|
const fn = target.prototype[method];
|
||||||
|
|
@ -264,7 +264,7 @@ export function Controller<T extends { new (...args: any[]): BaseController }>(b
|
||||||
// Loop over all the methods in the decorated class looking for methods that use the `@DELETE` decorator
|
// Loop over all the methods in the decorated class looking for methods that use the `@DELETE` decorator
|
||||||
Object.getOwnPropertyNames(target.prototype)
|
Object.getOwnPropertyNames(target.prototype)
|
||||||
// Find all methods that have the associated metadata key (`@DELETE` decorator)
|
// Find all methods that have the associated metadata key (`@DELETE` decorator)
|
||||||
.filter((method) => Reflect.getMetadata(DELETE_METADATA_KEY, target.prototype, method))
|
.filter((method) => typeof Reflect.getMetadata(DELETE_METADATA_KEY, target.prototype, method) !== 'undefined')
|
||||||
.map((method) => {
|
.map((method) => {
|
||||||
// Get the method
|
// Get the method
|
||||||
const fn = target.prototype[method];
|
const fn = target.prototype[method];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue