Developer exchange endpoint
This commit is contained in:
@ -13,6 +13,7 @@ import io.swagger.annotations.Api;
|
||||
|
||||
import com.plannaplan.App;
|
||||
import com.plannaplan.services.AssignmentService;
|
||||
import com.plannaplan.services.ExchangeService;
|
||||
|
||||
/**
|
||||
* Rest controller to enpoint that help deveopler test the app
|
||||
@ -27,13 +28,26 @@ public class DeveloperController {
|
||||
@Autowired
|
||||
private AssignmentService assignmentService;
|
||||
|
||||
@Autowired
|
||||
private ExchangeService exchangeService;
|
||||
|
||||
/**
|
||||
* @return if accept algoythm was perfomed
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_DEVELOPER')")
|
||||
@PostMapping(path = "/algoythm/accept")
|
||||
@PostMapping(path = "/algorythm/accept")
|
||||
public ResponseEntity<String> performAcceptAlgorythm() {
|
||||
this.assignmentService.callAcceptAlgorythm();
|
||||
return new ResponseEntity<>("Success", HttpStatus.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if accept algoythm was perfomed
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_DEVELOPER')")
|
||||
@PostMapping(path = "/algorythm/exchange")
|
||||
public ResponseEntity<String> performExchangeAlgorythm() {
|
||||
this.exchangeService.performExchange();
|
||||
return new ResponseEntity<>("Success", HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user