保誠-保戶業務員媒合平台
Tomas
2023-08-05 5c570b5c232af7475c6206e2b978735f396f8527
Fixed: [弱掃] p20.2 Bad use of null-like value
修改1個檔案
14 ■■■■■ 已變更過的檔案
PAMapp/shared/services/appointment.service.ts 14 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/shared/services/appointment.service.ts
@@ -119,9 +119,21 @@
  // 約訪通知 API
  async informAppointment(appointmentInformation: ToInformAppointment) {
    return http.post(`/notice/send`, appointmentInformation).then((res) => res.data);
    try {
      const response = await http.post(`/notice/send`, appointmentInformation);
      if (response !== null) {
        return response.data;
      } else {
        throw new Error('http.post returned null-like value.');
      }
    } catch (error) {
      console.error('An error occurred while informing appointment:', error);
      // 可以在此處處理錯誤或回傳預設值
      throw error;
    }
  }
  // 新增約訪記錄
  async createInterviewRecord(interviewRecordInfo: InterviewRecordInfo) {
    try {