Last change
on this file since dbd4834 was dfd5d87, checked in by Marko <Marko@…>, 23 months ago |
Registration logic with confirmation token implemented
|
-
Property mode
set to
100644
|
File size:
750 bytes
|
Rev | Line | |
---|
[dfd5d87] | 1 | package finki.it.phoneluxbackend.controllers;
|
---|
| 2 |
|
---|
| 3 | import finki.it.phoneluxbackend.data.RegistrationRequest;
|
---|
| 4 | import finki.it.phoneluxbackend.services.RegistrationService;
|
---|
| 5 | import lombok.AllArgsConstructor;
|
---|
| 6 | import org.springframework.web.bind.annotation.*;
|
---|
| 7 |
|
---|
| 8 | @RestController
|
---|
| 9 | @RequestMapping(path = "/registration")
|
---|
| 10 | @AllArgsConstructor
|
---|
| 11 | public class RegistrationController {
|
---|
| 12 | private final RegistrationService registrationService;
|
---|
| 13 |
|
---|
| 14 | @PostMapping
|
---|
| 15 | public String RegisterRequest(@RequestBody RegistrationRequest request)
|
---|
| 16 | {
|
---|
| 17 | return registrationService.register(request);
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | @GetMapping(path = "confirm")
|
---|
| 21 | public String confirm(@RequestParam("token") String token){
|
---|
| 22 | return registrationService.confirmToken(token);
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 |
|
---|
| 26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.