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

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