source: phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/RegistrationController.java@ dbd4834

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
Line 
1package finki.it.phoneluxbackend.controllers;
2
3import finki.it.phoneluxbackend.data.RegistrationRequest;
4import finki.it.phoneluxbackend.services.RegistrationService;
5import lombok.AllArgsConstructor;
6import org.springframework.web.bind.annotation.*;
7
8@RestController
9@RequestMapping(path = "/registration")
10@AllArgsConstructor
11public 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.