TF-4233 Implement edit label action
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||
import 'package:labels/model/label.dart';
|
||||
import 'package:tmail_ui_user/features/labels/data/datasource/label_datasource.dart';
|
||||
import 'package:tmail_ui_user/features/labels/data/network/label_api.dart';
|
||||
import 'package:tmail_ui_user/features/labels/domain/model/edit_label_request.dart';
|
||||
import 'package:tmail_ui_user/main/exceptions/exception_thrower.dart';
|
||||
|
||||
class LabelDatasourceImpl extends LabelDatasource {
|
||||
@@ -23,4 +24,11 @@ class LabelDatasourceImpl extends LabelDatasource {
|
||||
return await _labelApi.createNewLabel(accountId, labelData);
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Label> editLabel(AccountId accountId, EditLabelRequest labelRequest) {
|
||||
return Future.sync(() async {
|
||||
return await _labelApi.editLabel(accountId, labelRequest);
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user