Current tour endpoint
This commit is contained in:
		@@ -173,9 +173,20 @@ public class ConfigController {
 | 
			
		||||
    /**
 | 
			
		||||
     * @return api response entity
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping(path = "/config/tour")
 | 
			
		||||
    @ApiOperation("It will return what tour is currently on.")
 | 
			
		||||
    public ResponseEntity<ConfigTourResponse> getCurrentTourDate() {
 | 
			
		||||
        final ConfigTourResponse response = new ConfigTourResponse(this.contrl.getCurrentConfig().getCurrentState());
 | 
			
		||||
        return new ResponseEntity<>(response, HttpStatus.OK);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @return api response entity
 | 
			
		||||
     */
 | 
			
		||||
    @Deprecated
 | 
			
		||||
    @GetMapping(path = "/admin/tour")
 | 
			
		||||
    @PreAuthorize("hasRole('ROLE_ADMIN')")
 | 
			
		||||
    @ApiOperation("It will return what tour is currently on. You need to provide admin token.")
 | 
			
		||||
    @ApiOperation("It will return what tour is currently on. You need to provide admin token. It is depreaceted use /configurator/config/tour isntead.")
 | 
			
		||||
    public ResponseEntity<ConfigTourResponse> getTourDate() {
 | 
			
		||||
        final ConfigTourResponse response = new ConfigTourResponse(this.contrl.getCurrentConfig().getCurrentState());
 | 
			
		||||
        return new ResponseEntity<>(response, HttpStatus.OK);
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,7 @@ public class GroupDefaultResponse {
 | 
			
		||||
    @ApiModelProperty(value = "Value shows how many places is already taken by other students.")
 | 
			
		||||
    private Integer takenPlaces;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "Used only in resposnes realted to user assignments. For example in <code>/api/v1/users/schedule</code>.")
 | 
			
		||||
    @ApiModelProperty(value = "Used only in resposnes realted to user assignments. For example in /api/v1/users/schedule.")
 | 
			
		||||
    private Boolean isAccepted;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,8 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
 | 
			
		||||
    @Override
 | 
			
		||||
    public void configure(final WebSecurity webSecurity) {
 | 
			
		||||
        webSecurity.ignoring().antMatchers("/token**").antMatchers("/token/refresh**")
 | 
			
		||||
                .antMatchers("/api/v1/courses/all").antMatchers("/api/v1/groups/course/{id}")
 | 
			
		||||
                .antMatchers("/api/v1/courses/all")
 | 
			
		||||
                .antMatchers("/api/v1/groups/course/{id}", "/api/v1/configurator/config/tour")
 | 
			
		||||
                .antMatchers("/v2/api-docs", "/configuration/ui", "/swagger-resources/**", "/configuration/security",
 | 
			
		||||
                        "/swagger-ui.html", "/webjars/**");
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user