aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/server/KeystoreManager.java2
-rw-r--r--src/main/java/com/juick/server/api/xnodeinfo2/Info.java5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/com/juick/server/KeystoreManager.java b/src/main/java/com/juick/server/KeystoreManager.java
index 97c3a224..67a24f11 100644
--- a/src/main/java/com/juick/server/KeystoreManager.java
+++ b/src/main/java/com/juick/server/KeystoreManager.java
@@ -22,7 +22,7 @@ import java.util.stream.Collectors;
@Component
public class KeystoreManager {
private static final Logger logger = LoggerFactory.getLogger("com.juick.server");
- @Value("${keystore:../juick.p12}")
+ @Value("${keystore:juick.p12}")
private String keystore;
@Value("${keystore_password:secret}")
private String keystorePassword;
diff --git a/src/main/java/com/juick/server/api/xnodeinfo2/Info.java b/src/main/java/com/juick/server/api/xnodeinfo2/Info.java
index c12df55f..36e36bdd 100644
--- a/src/main/java/com/juick/server/api/xnodeinfo2/Info.java
+++ b/src/main/java/com/juick/server/api/xnodeinfo2/Info.java
@@ -7,7 +7,6 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.inject.Inject;
-import java.time.Instant;
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;
import java.util.Arrays;
@@ -36,9 +35,9 @@ public class Info {
UserStats userStats = new UserStats();
userStats.setTotal(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM users WHERE banned=0", Integer.class));
userStats.setActiveMonth(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM users WHERE banned=0 AND last_seen > ?",
- Integer.class, ZonedDateTime.now().minus(1, ChronoUnit.MONTHS).toInstant()));
+ Integer.class, ZonedDateTime.now().minus(1, ChronoUnit.MONTHS).toLocalDateTime()));
userStats.setActiveHalfyear(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM users WHERE banned=0 AND last_seen > ?",
- Integer.class, ZonedDateTime.now().minus(6, ChronoUnit.MONTHS).toInstant()));
+ Integer.class, ZonedDateTime.now().minus(6, ChronoUnit.MONTHS).toLocalDateTime()));
Usage usage = new Usage();
usage.setUsers(userStats);
usage.setLocalPosts(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM messages",