diff options
author | 2018-11-08 22:02:44 +0300 | |
---|---|---|
committer | 2018-11-08 22:02:44 +0300 | |
commit | 6f65b8e723c587a2c2442bafa1723ab3d6e1fc8c (patch) | |
tree | de3a72def9a1f7867e724173fbe97e4edbe77ce6 /src/main/java/com | |
parent | 940488b2dd40a1c85a8bed91553e800d7a97cb29 (diff) |
Fix tests
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/juick/server/KeystoreManager.java | 2 | ||||
-rw-r--r-- | src/main/java/com/juick/server/api/xnodeinfo2/Info.java | 5 |
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", |