updateFCMToken method
Updates the Firebase Cloud Messaging (FCM) token for the current user.
fcmToken
The new FCM token.
blockId
An optional current block ID to associate with the token.
Returns a Future<Map<String, dynamic>>
containing the response from the update operation.
Implementation
Future<Map<String, dynamic>> updateFCMToken(
String fcmToken, int? blockId) async {
return await _makeRequest(
'/api/update-fcm-token/',
method: 'POST',
body: {
'fcm_token': fcmToken,
if (blockId != null) 'current_block_id': blockId,
},
);
}