Commit 35a1a5ff authored by Artem Hrybeniuk's avatar Artem Hrybeniuk Committed by Matija Obreza
Browse files

SMTP: Added smtpEnabled variable to status API

parent 9a33db09
......@@ -15,6 +15,7 @@
*/
package org.gringlobal.api.v1.impl;
import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.oauth.persistence.OAuthClientRepository;
import org.genesys.blocks.security.SecurityContextUtil;
import org.gringlobal.api.v1.ApiBaseController;
......@@ -44,6 +45,9 @@ public class SystemStatusController {
@Value("${captcha.enabled}")
private Boolean captchaEnabled;
@Value("${mail.host}")
private String mailHost;
@Autowired
private OAuthClientRepository oauthClientRepository;
......@@ -76,6 +80,7 @@ public class SystemStatusController {
status.captchaSiteKey = oAuthClient.getPublicRecaptchaKey();
}
}
status.smtpEnabled = StringUtils.isNotBlank(mailHost);
return status;
}
......@@ -86,6 +91,7 @@ public class SystemStatusController {
public long geographyCount;
public long inventoryCount;
public String captchaSiteKey;
public boolean smtpEnabled;
}
}
......@@ -116,8 +116,8 @@ repository.blacklist.filename=^(\\.|\\~)|^Thumbs.db$
repository.blacklist.foldername=(^\\.)|[~!\\/]
# Mail properties
mail.host=localhost
mail.port=25
mail.host=
mail.port=
mail.async=true
mail.debug=false
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment