{"action":"closed","issue":{"url":"https://api.github.com/repos/nestjs/nest/issues/558","repository_url":"https://api.github.com/repos/nestjs/nest","labels_url":"https://api.github.com/repos/nestjs/nest/issues/558/labels{/name}","comments_url":"https://api.github.com/repos/nestjs/nest/issues/558/comments","events_url":"https://api.github.com/repos/nestjs/nest/issues/558/events","html_url":"https://github.com/nestjs/nest/issues/558","id":313558873,"number":558,"title":"@Query not working on same @Get() path","user":{"login":"Tyler-V","id":3893234,"avatar_url":"https://avatars1.githubusercontent.com/u/3893234?v=4","gravatar_id":"","url":"https://api.github.com/users/Tyler-V","html_url":"https://github.com/Tyler-V","followers_url":"https://api.github.com/users/Tyler-V/followers","following_url":"https://api.github.com/users/Tyler-V/following{/other_user}","gists_url":"https://api.github.com/users/Tyler-V/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyler-V/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyler-V/subscriptions","organizations_url":"https://api.github.com/users/Tyler-V/orgs","repos_url":"https://api.github.com/users/Tyler-V/repos","events_url":"https://api.github.com/users/Tyler-V/events{/privacy}","received_events_url":"https://api.github.com/users/Tyler-V/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-12T02:55:19Z","updated_at":"2018-04-12T04:56:47Z","closed_at":"2018-04-12T04:56:47Z","author_association":"NONE","body":"I am sending a GET to /scripts and /scripts?id=1 and both resolve to the first @Get().\r\n\r\nI am hoping this is just user error in taking the wrong approach, how would I define a GET on the same route except with optional query parameters?\r\n\r\nThanks!\r\n\r\n```\r\n@Controller('scripts')\r\nexport class ScriptController {\r\n    constructor(private readonly scriptService: ScriptService) { }\r\n\r\n    @Get()\r\n    getScripts(): Promise<Script[]> {\r\n        return this.scriptService.getScripts();\r\n    }\r\n\r\n    @Get()\r\n    getScriptsByAuthor(@Query('id') id: number): Promise<Script[]> {\r\n        return this.scriptService.findScriptsByAuthorId(id);\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"Tyler-V"}}