保誠-保戶業務員媒合平台
Tomas
2023-08-05 8ead9cc19425acfb1f64a4e135cdd7d02cb7fe35
Fixed: [弱掃] p18.1 Bad use of null-like value
修改1個檔案
13 ■■■■■ 已變更過的檔案
PAMapp/shared/services/appointment.service.ts 13 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/shared/services/appointment.service.ts
@@ -124,7 +124,18 @@
  // 新增約訪記錄
  async createInterviewRecord(interviewRecordInfo: InterviewRecordInfo) {
    return http.post('/interview_record/create', interviewRecordInfo).then(res => res.data);
    try {
      const response = await http.post('/interview_record/create', interviewRecordInfo);
      if (response !== null) {
        return response.data;
      } else {
        throw new Error('http.post returned null-like value.');
      }
    } catch (error) {
      console.error('An error occurred while creating interview record:', error);
      // 可以在此處處理錯誤或回傳預設值
      throw error;
    }
  }
  // 修改約訪記錄