diff options
author | Vitaly Takmazov | 2017-10-24 17:18:29 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-10-24 22:34:41 +0300 |
commit | de2cc2db73a5de42d9bfaeb92604f28abe2a328a (patch) | |
tree | 352a3d76fcbc987f068527ff043174308a666654 /juick-notifications/src/main/java/com/juick/components/service | |
parent | 881a546bf7a56550eec1e38ce839f47a1cb1a750 (diff) |
crosspost: refactoring
* spring-social
* get tokens via service api
Diffstat (limited to 'juick-notifications/src/main/java/com/juick/components/service')
-rw-r--r-- | juick-notifications/src/main/java/com/juick/components/service/NotificationsTokenService.java | 6 |
1 files changed, 3 insertions, 3 deletions
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<String> devices) { if (devices.size() > 0) { - List<DeviceRegistration> list = devices.stream() - .map(d -> new DeviceRegistration(type, d)).collect(Collectors.toList()); + List<ExternalToken> 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", |