Last change
on this file since f25d07e was f25d07e, checked in by Marko <Marko@…>, 22 months ago |
Edited registration and login services
|
-
Property mode
set to
100644
|
File size:
814 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;
|
---|
[f25d07e] | 6 | import org.springframework.http.ResponseEntity;
|
---|
[dfd5d87] | 7 | import org.springframework.web.bind.annotation.*;
|
---|
| 8 |
|
---|
| 9 | @RestController
|
---|
| 10 | @RequestMapping(path = "/registration")
|
---|
| 11 | @AllArgsConstructor
|
---|
| 12 | public class RegistrationController {
|
---|
| 13 | private final RegistrationService registrationService;
|
---|
| 14 |
|
---|
| 15 | @PostMapping
|
---|
[f25d07e] | 16 | public ResponseEntity<Object> RegisterRequest(@RequestBody RegistrationRequest request)
|
---|
[dfd5d87] | 17 | {
|
---|
| 18 | return registrationService.register(request);
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | @GetMapping(path = "confirm")
|
---|
| 22 | public String confirm(@RequestParam("token") String token){
|
---|
| 23 | return registrationService.confirmToken(token);
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.