JAVA-16938, Fix gcp-firebase module. (#13284)

Co-authored-by: jogra <joseph.sterling.grah@miles.no>
This commit is contained in:
jsgrah-spring 2023-01-12 17:36:14 +01:00 committed by GitHub
parent 02b56bf783
commit b83c8d765d
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package com.baeldung.gcp.firebase.publisher.controller;
import java.util.List;
import java.util.Arrays;
import java.util.stream.Collectors;
import org.springframework.http.HttpStatus;
@ -103,7 +104,7 @@ public class FirebasePublisherController {
@DeleteMapping("/subscriptions/{topic}/{registrationToken}")
public ResponseEntity<Void> deleteSubscription(@PathVariable String topic, @PathVariable String registrationToken) throws FirebaseMessagingException {
fcm.subscribeToTopic(List.of(registrationToken), topic);
fcm.subscribeToTopic(Arrays.asList(registrationToken), topic);
return ResponseEntity.ok().build();
}
}