Last active
March 27, 2020 08:06
-
-
Save nuboat/a4c5c1c2eecb0c8e90f0f607ea6b2c8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package link.colon.controller; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.PathVariable; | |
import org.springframework.web.bind.annotation.RestController; | |
import java.util.Map; | |
@Slf4j | |
@RestController | |
class AM { | |
private final Map<String, String> store; | |
AM() { | |
store = Map.of("123", "นบ.", "124", "บน."); | |
} | |
@GetMapping(value = "/verify/{token}") | |
private String verify(@PathVariable("token") final String token) { | |
log.info("Authoen by {}", token); | |
return store.getOrDefault("token", null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment