21 lines
596 B
TypeScript
21 lines
596 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
|
import { TodayService } from './today.service';
|
|
|
|
@ApiTags('Today')
|
|
@Controller('today')
|
|
export class TodayController {
|
|
constructor(private readonly todayService: TodayService) {}
|
|
|
|
@Get()
|
|
@ApiOperation({ summary: 'Get aggregated daily view for today' })
|
|
getToday() {
|
|
return this.todayService.getToday();
|
|
}
|
|
|
|
@Get('next-action')
|
|
@ApiOperation({ summary: 'Get the best next action to take right now' })
|
|
getNextAction() {
|
|
return this.todayService.getNextAction();
|
|
}
|
|
}
|