Skip to content

Commit

Permalink
Refactor: Update GptController with additional query parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Ho-s committed Sep 30, 2024
1 parent 2c02b19 commit 4812edd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gpt/gpt.controller.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Controller, Get, Param, Query, Sse } from '@nestjs/common';
import { ApiBearerAuth, ApiResponse, ApiTags } from '@nestjs/swagger';
import { ApiBearerAuth, ApiQuery, ApiResponse, ApiTags } from '@nestjs/swagger';

import { Observable } from 'rxjs';

Expand Down Expand Up @@ -32,6 +32,9 @@ export class GptController {

@UseAuthGuard([UserRole.USER])
@Sse('restaurants/recommend')
@ApiQuery({ name: 'question', required: true })
@ApiQuery({ name: 'x', required: false })
@ApiQuery({ name: 'y', required: false })
async recommendRestaurants(
@CurrentUser() user: User,
@Query('question') question: string,
Expand Down

0 comments on commit 4812edd

Please sign in to comment.