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

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
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.