|
1 | 1 | package com.github.throyer.common.springboot.controllers.api; |
2 | 2 |
|
3 | | -import com.github.throyer.common.springboot.utils.Hello; |
| 3 | +import java.util.List; |
| 4 | +import java.util.Random; |
4 | 5 |
|
5 | | -import io.swagger.v3.oas.annotations.Operation; |
6 | 6 | import org.springframework.web.bind.annotation.GetMapping; |
7 | 7 | import org.springframework.web.bind.annotation.RequestMapping; |
8 | 8 | import org.springframework.web.bind.annotation.RestController; |
9 | 9 |
|
| 10 | +import com.github.throyer.common.springboot.utils.Hello; |
| 11 | + |
| 12 | +import io.swagger.v3.oas.annotations.Operation; |
| 13 | + |
10 | 14 | @RestController |
11 | 15 | @RequestMapping("/api") |
12 | 16 | public class ApiController { |
13 | 17 |
|
14 | 18 | @GetMapping |
15 | 19 | @Operation(hidden = true) |
16 | 20 | public Hello index() { |
17 | | - return () -> "Is a live!"; |
| 21 | + |
| 22 | + var quotes = List.of( |
| 23 | + "You talking to me? - Taxi Driver", |
| 24 | + "I'm going to make him an offer he can't refuse. - The Godfather", |
| 25 | + "May the Force be with you. - Star Wars", |
| 26 | + "You're gonna need a bigger boat. - Jaws", |
| 27 | + "Dadinho é o caralho! meu nome é Zé Pequeno, porra!", |
| 28 | + "Say “hello” to my little friend! - Scarface", |
| 29 | + "Bond. James Bond. - Dr. No", |
| 30 | + "Hasta la vista, baby. - Terminator 2", |
| 31 | + "I see dead people. - The Sixth Sense", |
| 32 | + "Houston, we have a problem. - Apollo 13", |
| 33 | + "Só sei que foi assim. - O Auto da Compadecida" |
| 34 | + ); |
| 35 | + |
| 36 | + var quote = quotes.get(new Random().nextInt(quotes.size())); |
| 37 | + |
| 38 | + return () -> quote; |
18 | 39 | } |
19 | 40 | } |
0 commit comments