parent
40cec0dae1
commit
0f25746a87
@ -1,12 +1,17 @@ |
||||
import { Body, Controller, Get } from "@nestjs/common"; |
||||
import { AppService } from "./app.service"; |
||||
import { CatsService } from "./cats/cats.service"; |
||||
|
||||
@Controller("") |
||||
export class AppController { |
||||
constructor(private readonly appService: AppService) {} |
||||
constructor( |
||||
private readonly appService: AppService, |
||||
private readonly catsService: CatsService, |
||||
) {} |
||||
|
||||
@Get() |
||||
getHello(): string { |
||||
return this.appService.getHello(); |
||||
// return this.appService.getHello();
|
||||
return this.catsService.hiCatServiceProduct(); |
||||
} |
||||
} |
||||
|
@ -1,4 +1,8 @@ |
||||
import { Injectable } from "@nestjs/common"; |
||||
|
||||
@Injectable() |
||||
export class CatsService {} |
||||
export class CatsService { |
||||
hiCatServiceProduct() { |
||||
return "hello cat!"; |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue