get posts return array

This commit is contained in:
Jeremy Yin 2019-06-17 22:48:32 +08:00
parent 77a3611d7f
commit b09fa24810
1 changed files with 11 additions and 2 deletions

View File

@ -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 ~'
}
]
}
}