updateRoomMetadata method
Implementation
Future<Map<String, dynamic>> updateRoomMetadata({
required String roomId,
required String metadata,
}) async {
try {
final response = await _dio.put(
'/rooms/room-metadata',
data: {
'roomId': roomId,
'metadata': metadata,
},
);
if (response.statusCode != 200) {
throw Exception(
response.data?['message'] ?? 'Failed to update metadata');
}
return response.data;
} catch (e) {
throw Exception('Failed to update metadata: $e');
}
}