Closed
Description
Description
When using a base class to implement some methods, and inheriting more than once from it, only the first class gets the methods as actions in getMetadataArgsStorage()
.
import { Controller, Get, Post } from 'routing-controllers';
export class BaseContr {
@Get('/get') getSome() {
return 'some';
}
@Post('/post') postSome() {}
}
@Controller('/api/c1')
export class Contr1 extends BaseContr {}
@Controller('/api/c2')
export class Contr2 extends BaseContr {}
Expected behavior
Would expect multiple action records, for the same action in different derived controllers. So that they get called on their respective URLs.
Actual behavior
Only seeing in the actions array the methods for Contr1
, not those of Contr2
; this results in the URLs of Contr2
returning 404