2025-08-22 17:02:49 +09:00
|
|
|
import { Controller, Get, UseGuards } from "@nestjs/common";
|
2025-08-21 15:24:40 +09:00
|
|
|
import { CatalogService } from "./catalog.service";
|
2025-08-22 17:02:49 +09:00
|
|
|
import { ApiTags, ApiOperation, ApiBearerAuth } from "@nestjs/swagger";
|
|
|
|
|
import { JwtAuthGuard } from "../auth/guards/jwt-auth.guard";
|
2025-08-20 18:02:50 +09:00
|
|
|
|
2025-08-21 15:24:40 +09:00
|
|
|
@ApiTags("catalog")
|
|
|
|
|
@Controller("catalog")
|
2025-08-22 17:02:49 +09:00
|
|
|
@UseGuards(JwtAuthGuard)
|
|
|
|
|
@ApiBearerAuth()
|
2025-08-20 18:02:50 +09:00
|
|
|
export class CatalogController {
|
|
|
|
|
constructor(private catalogService: CatalogService) {}
|
|
|
|
|
|
|
|
|
|
@Get()
|
2025-08-22 17:02:49 +09:00
|
|
|
@ApiOperation({ summary: "Get product catalog (authenticated users only)" })
|
2025-08-20 18:02:50 +09:00
|
|
|
async getCatalog() {
|
|
|
|
|
return this.catalogService.getProducts();
|
|
|
|
|
}
|
|
|
|
|
}
|