223
This commit is contained in:
parent
f3652b8170
commit
f625139d2c
|
@ -16,30 +16,13 @@ export class GoodsController {
|
|||
}
|
||||
|
||||
// 示例2:路径参数
|
||||
@Get('detail/:id')
|
||||
getDetail(@Param('id') id: string) {
|
||||
return {
|
||||
id: id,
|
||||
detail: `Detail for product ${id}`
|
||||
};
|
||||
}
|
||||
|
||||
// 示例3:多个查询参数
|
||||
@Get('search')
|
||||
searchProducts(
|
||||
@Query('keyword') keyword: string,
|
||||
@Query('page') page: number = 1,
|
||||
@Query('limit') limit: number = 10
|
||||
) {
|
||||
return {
|
||||
@Get('detail/:id')<<<<<<< HEAD
|
||||
keyword,
|
||||
page,
|
||||
limit,
|
||||
results: []
|
||||
};
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
}
|
||||
=======
|
||||
}
|
||||
>>>>>>> de6e632ec69dd408a6c4e85d5cda01a1aa8e8276
|
||||
|
||||
|
|
|
@ -3,18 +3,8 @@ import { GoodsService } from './goods.service';
|
|||
import { GoodsController } from './goods.controller';
|
||||
|
||||
@Module({
|
||||
<<<<<<< HEAD
|
||||
|
||||
providers: [GoodsService],
|
||||
controllers:[GoodsController]
|
||||
|
||||
|
||||
})
|
||||
|
||||
export class GoodsModule {}
|
||||
=======
|
||||
providers: [GoodsService],
|
||||
controllers: [GoodsController],
|
||||
})
|
||||
export class GoodsModule {}
|
||||
>>>>>>> de6e632ec69dd408a6c4e85d5cda01a1aa8e8276
|
||||
|
||||
|
|
Loading…
Reference in New Issue