From de2cc2db73a5de42d9bfaeb92604f28abe2a328a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 24 Oct 2017 17:18:29 +0300 Subject: crosspost: refactoring * spring-social * get tokens via service api --- .../com/juick/components/service/NotificationsTokenService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'juick-notifications/src/main/java/com/juick/components/service/NotificationsTokenService.java') diff --git a/juick-notifications/src/main/java/com/juick/components/service/NotificationsTokenService.java b/juick-notifications/src/main/java/com/juick/components/service/NotificationsTokenService.java index 7b9a88a3..fce52987 100644 --- a/juick-notifications/src/main/java/com/juick/components/service/NotificationsTokenService.java +++ b/juick-notifications/src/main/java/com/juick/components/service/NotificationsTokenService.java @@ -1,6 +1,6 @@ package com.juick.components.service; -import com.juick.DeviceRegistration; +import com.juick.ExternalToken; import com.juick.service.BaseRestService; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpEntity; @@ -28,8 +28,8 @@ public class NotificationsTokenService extends BaseRestService implements TokenS @Override public void deleteTokens(String type, List devices) { if (devices.size() > 0) { - List list = devices.stream() - .map(d -> new DeviceRegistration(type, d)).collect(Collectors.toList()); + List list = devices.stream() + .map(d -> new ExternalToken(null, null, type, d)).collect(Collectors.toList()); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON_UTF8); getRest().exchange("http://api.juick.com/notifications", -- cgit v1.2.3