aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/controllers/Site.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/www/controllers/Site.java')
-rw-r--r--src/main/java/com/juick/www/controllers/Site.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java
index 1dc4c338..1169414f 100644
--- a/src/main/java/com/juick/www/controllers/Site.java
+++ b/src/main/java/com/juick/www/controllers/Site.java
@@ -34,6 +34,7 @@ import com.juick.util.MessageUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.commons.text.StringEscapeUtils;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
@@ -74,6 +75,10 @@ public class Site {
private WebApp webApp;
@Inject
private User serviceUser;
+ @Value("${web_domain:localhost}")
+ private String webDomain;
+ @Value("${telegram_botname:Juick_bot}")
+ private String tgBot;
private void fillUserModel(ModelMap model, User user, User visitor) {
user.setAvatar(webApp.getAvatarWebPath(user));
@@ -103,6 +108,8 @@ public class Site {
}
model.addAttribute("visitor", visitor);
model.addAttribute("tags", tagService.getPopularTags());
+ model.addAttribute("domain", webDomain);
+ model.addAttribute("tgBot", tgBot);
AuthenticationException authEx = (AuthenticationException) session
.getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION);