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