JAVA-16938, Fix gcp-firebase module. (#13284)
Co-authored-by: jogra <joseph.sterling.grah@miles.no>
This commit is contained in:
parent
02b56bf783
commit
b83c8d765d
|
@ -2,6 +2,7 @@ package com.baeldung.gcp.firebase.publisher.controller;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
@ -103,7 +104,7 @@ public class FirebasePublisherController {
|
||||||
|
|
||||||
@DeleteMapping("/subscriptions/{topic}/{registrationToken}")
|
@DeleteMapping("/subscriptions/{topic}/{registrationToken}")
|
||||||
public ResponseEntity<Void> deleteSubscription(@PathVariable String topic, @PathVariable String registrationToken) throws FirebaseMessagingException {
|
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();
|
return ResponseEntity.ok().build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue