|
|
@@ -1,6 +1,7 @@
|
|
|
import 'package:electronic_assistant/base/base_controller.dart';
|
|
|
import 'package:electronic_assistant/data/api/request/talk_request.dart';
|
|
|
import 'package:electronic_assistant/data/bean/agenda.dart';
|
|
|
+import 'package:electronic_assistant/data/consts/error_code.dart';
|
|
|
import 'package:electronic_assistant/resource/string.gen.dart';
|
|
|
import 'package:get/get.dart';
|
|
|
import 'package:get/get_rx/src/rx_types/rx_types.dart';
|
|
|
@@ -66,7 +67,8 @@ class AgendaRepository {
|
|
|
|
|
|
Future<void> agendaFinish(String? id, bool complete) async {
|
|
|
if (!accountRepository.isLogin.value) {
|
|
|
- throw ServerErrorException(-1, StringName.noLogin.tr);
|
|
|
+ throw ServerErrorException(
|
|
|
+ ErrorCode.errorCodeNoLogin, StringName.errorCodeNoLogin.tr);
|
|
|
}
|
|
|
return atmobApi
|
|
|
.agendaFinish(AgendaStatusRequest(id, complete))
|
|
|
@@ -89,7 +91,8 @@ class AgendaRepository {
|
|
|
|
|
|
Future<void> agendaTodo(String id, bool isTodo) async {
|
|
|
if (!accountRepository.isLogin.value) {
|
|
|
- throw ServerErrorException(-1, StringName.noLogin.tr);
|
|
|
+ throw ServerErrorException(
|
|
|
+ ErrorCode.errorCodeNoLogin, StringName.errorCodeNoLogin.tr);
|
|
|
}
|
|
|
return atmobApi
|
|
|
.agendaTodo(AgendaTodoRequest(id, isTodo))
|