/*
 * @Descripttion: 
 * @version: 
 * @Author: guanxiaoxin
 * @Date: 2023-09-18 18:40:48
 * @LastEditors: guanxiaoxin
 * @LastEditTime: 2023-09-22 13:54:34
 * @FilePath: \VNoteApp\lib\managers\exam.dart
 */
import 'package:fis_jsonrpc/rpc.dart';
import 'package:vnoteapp/managers/interfaces/exam.dart';
import 'package:vnoteapp/rpc.dart';
import 'package:vnoteapp/store/store.dart';
import 'package:fis_common/logger/logger.dart';

class ExamManager implements IExamManager {
  @override
  Future<String?> createExam(CreateExamRequest examRequest) async {
    try {
      examRequest.token = Store.user.token;
      final examCode = await rpc.exam.createExamAsync(
        examRequest,
      );
      return examCode;
    } catch (e) {
      logger.e("ExamManager sync user info error.", e);
      return null;
    }
  }
  //   @override
  // Future<String> createFollowUp(CreateFollowUpRequest examRequest) async {
  //   try {
  //     examRequest.token = Store.user.token;
  //     final examCode = await rpc.followUp.createFollowUpAsync(
  //       examRequest,
  //     );
  //     return examCode;
  //   } catch (e) {
  //     logger.e("DoctorManager sync user info error.", e);
  //     return '';
  //   }
  // }
}
