TF-1289: [Data] Implement DestroySubscription in fcm datasource
This commit is contained in:
@@ -68,4 +68,9 @@ class CacheFCMDatasourceImpl extends FCMDatasource {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> destroySubscription(String subscriptionId) {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
}
|
||||
@@ -58,4 +58,13 @@ class FcmDatasourceImpl extends FCMDatasource {
|
||||
Future<FCMSubscriptionCache> geSubscription() {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> destroySubscription(String subscriptionId) {
|
||||
return Future.sync(() async {
|
||||
return await _fcmApi.destroySubscription(subscriptionId);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user