get posts return array
This commit is contained in:
parent
77a3611d7f
commit
b09fa24810
|
@ -1,4 +1,13 @@
|
||||||
import { Controller } from '@nestjs/common';
|
import { Controller, Get } from '@nestjs/common';
|
||||||
|
|
||||||
@Controller('posts')
|
@Controller('posts')
|
||||||
export class PostsController {}
|
export class PostsController {
|
||||||
|
@Get()
|
||||||
|
index() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
title: 'hello ~'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue