From c04eb6d3769f5a52372b560160147f7acc7079e8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 9 Feb 2018 14:55:23 +0300 Subject: server: add some tests --- juick-server/src/main/java/com/juick/server/VKWallManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-server/src/main/java/com') diff --git a/juick-server/src/main/java/com/juick/server/VKWallManager.java b/juick-server/src/main/java/com/juick/server/VKWallManager.java index 364087eb..5c0fee81 100644 --- a/juick-server/src/main/java/com/juick/server/VKWallManager.java +++ b/juick-server/src/main/java/com/juick/server/VKWallManager.java @@ -43,7 +43,7 @@ public class VKWallManager { serviceUser = userService.getUserByName(serviceUsername); TransportClient transportClient = HttpTransportClient.getInstance(); vk = new VkApiClient(transportClient); - Pair tokens = crosspostService.getVkTokens(serviceUser.getUid()).get(); + Pair tokens = crosspostService.getVkTokens(serviceUser.getUid()).orElse(Pair.of("0", "0")); actor = new UserActor(Integer.valueOf(tokens.getLeft()), tokens.getRight()); } public void post(String status, String link) throws ClientException, ApiException { -- cgit v1.2.3