title: Differentiate 2 routes of a controller (NestJS)
body: <p><strong>EDIT: When I move the @Get('/random') above the 2 other routes, it's working... Weird</strong></p>
  <p>I'm doing a NestJS server that just get some routes of the Breaking Bad API and displays the JSON in the routes of the server,</p>
  <p>I want to create 3 routes :</p>
  <ul>
  <li>1 that returns a JSON of all characters of the show (/characters/all)</li>
  <li>1 that returns a JSON of a single character of the show (/characters/:id)</li>
  <li>1 that returns a JSON of a random character of the show (/character/random)</li>
  </ul>
  <p>The 2 firsts routes are working, but <strong>I can't get the last one</strong>,
  <strong>I get an error 500 that says Error: Request failed with status code 500 and the url targeted is 'https://www.breakingbadapi.com/api/characters/random', I d on't know why it's 'characters' and not 'character'</strong></p>
  <p>Here is my code :</p>
  <p>characters.controller.ts</p>
  <pre><code>import { Controller, Get, Post, Body, Param } from '@nestjs/common';
  import { CharactersService } from './characters.service';
  
  @Controller('characters')
  export class CharactersController {
      constructor(private readonly charactersService: CharactersService) {}
  
      @Get('/all')
      getAll() {
          return this.charactersService.getAll();
      }
  
      @Get(':id')
      getOne(@Param('id') id: string) {
          return this.charactersService.getOne(id);
      }
  
      @Get('/random')
      getRandom() {
          return this.charactersService.getRandom();
      }
  }
  </code></pre>
  <p>characters.service.ts</p>
  <pre><code>import axios from &quot;axios&quot;;
  
  import { Injectable } from '@nestjs/common';
  
  @Injectable()
  export class CharactersService {
      getAll() {
        return axios.get(`${process.env.ENDPOINT_BASE_URL}/characters`, {
          params: {
            limit: null,
            offset: null,
            name: &quot;&quot;
          }
        }).then(function (response) {
            return response.data;
          })
          .catch(function (error) {
            console.log(error);
          });
      }
  
      getOne(id: string) {
        return axios.get(`${process.env.ENDPOINT_BASE_URL}/characters/${id}`).then(function (response) {
          return response.data;
        })
        .catch(function (error) {
          console.log(error);
        });
      }
  
      getRandom() {
        return axios.get(`${process.env.ENDPOINT_BASE_URL}/character/random`).then(function (response) {
          return response.data;
        })
        .catch(function (error) {
          console.log(error);
        });
      }
  }
  </code></pre>
  <p>.env</p>
  <pre><code>ENDPOINT_BASE_URL=https://www.breakingbadapi.com/api
  </code></pre>