-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IKC-300 Fetch and display survey for user
- Loading branch information
Piotr Belke
authored and
Piotr Belke
committed
Sep 8, 2023
1 parent
759d228
commit fbf6fcd
Showing
4 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
kouncil-backend/src/main/java/com/consdata/kouncil/survey/SurveyController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.consdata.kouncil.survey; | ||
|
||
import static com.consdata.kouncil.config.security.RoleNames.ADMIN_ROLE; | ||
import static com.consdata.kouncil.config.security.RoleNames.EDITOR_ROLE; | ||
import static com.consdata.kouncil.config.security.RoleNames.VIEWER_ROLE; | ||
|
||
import javax.annotation.security.RolesAllowed; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@Slf4j | ||
@RestController | ||
public class SurveyController { | ||
|
||
@Value("${kouncil.survey.base-path:}") | ||
private String surveyBasePath; | ||
|
||
@RolesAllowed({ADMIN_ROLE, EDITOR_ROLE, VIEWER_ROLE}) | ||
@GetMapping("/api/survey/config") | ||
public String getSurveyBasePath() { | ||
return surveyBasePath; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters