Last change
on this file since 7e88e46 was f25d07e, checked in by Marko <Marko@…>, 2 years ago |
Edited registration and login services
|
-
Property mode
set to
100644
|
File size:
814 bytes
|
Line | |
---|
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.http.ResponseEntity;
|
---|
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
|
---|
16 | public ResponseEntity<Object> RegisterRequest(@RequestBody RegistrationRequest request)
|
---|
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.