Skip to content

Commit fdd6670

Browse files
committed
fix: mark GET /templates and GET /templates/:id as public
1 parent ecde7bb commit fdd6670

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

apps/api/src/templates/templates.controller.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@ import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
33
import { TemplatesService } from './templates.service';
44
import { JwtAuthGuard } from '../common/guards/jwt-auth.guard';
55
import { CurrentWorkspaceId } from '../common/decorators/current-user.decorator';
6+
import { Public } from '../common/decorators/public.decorator';
67
import type { TemplateCategory } from './template.entity';
78

89
@ApiTags('Templates')
910
@Controller('templates')
1011
export class TemplatesController {
1112
constructor(private readonly service: TemplatesService) {}
1213

14+
@Public()
1315
@Get()
1416
findAll(@Query('category') category?: TemplateCategory) {
1517
return this.service.findAll(category);
1618
}
1719

20+
@Public()
1821
@Get(':id')
1922
findOne(@Param('id') id: string) {
2023
return this.service.findOne(id);

0 commit comments

Comments
 (0)