Files
api-AT/src/mensaje/mensaje.controller.ts
T

21 lines
522 B
TypeScript
Raw Normal View History

2026-02-23 18:16:17 -06:00
import { Controller, Get, Param, UseGuards } from '@nestjs/common';
import { MensajeService } from './mensaje.service';
2026-02-23 18:16:17 -06:00
import { JwtAuthGuard } from 'src/user/jwt.guard';
@Controller('mensaje')
export class MensajeController {
2026-02-23 18:16:17 -06:00
constructor(private readonly mensajeService: MensajeService) { }
2026-02-23 18:16:17 -06:00
@UseGuards(JwtAuthGuard)
@Get()
findAll() {
return this.mensajeService.findAll();
}
2026-02-23 18:16:17 -06:00
@UseGuards(JwtAuthGuard)
@Get(':id')
findOne(@Param('id') id: string) {
return this.mensajeService.findOne(+id);
}
}