import { injectable } from 'inversify' ; import { ApiController , Controller , HttpGet , SendsResponse , Async } from '../../../../index' ; import { IAboutService } from '../services/about.service' ; import { About } from '../model/about.model' ; @ injectable ( ) @ Controller ( '/home' ) export class HomeController extends ApiController { name : string ; constructor ( private aboutService ) { super ( ) ; this . name = 'HomeController' ; } @ HttpGet ( '/name' ) get ( ) { return this . name ; } @ Async ( ) @ HttpGet ( '/await-about' ) async getAbout ( ) { return await this . aboutService . getViaPromise ( ) ; } @ SendsResponse ( ) @ HttpGet ( '/image/:id' ) getId ( id ) { setTimeout ( ( ) => { this . dino . proceed ( `Value of id is ${ id }` ) ; } , 10 ) ; } }