保誠-保戶業務員媒合平台
Tomas
2023-08-05 8ca4e8557c729e0a1bc0e2dc9e0d033930539e56
Fixed: [弱掃] p15.1 Bad use of null-like value
修改1個檔案
16 ■■■■ 已變更過的檔案
PAMapp/shared/services/account-setting.service.ts 16 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/shared/services/account-setting.service.ts
@@ -14,9 +14,21 @@
  }
  //編輯顧問帳號資訊
  async editAgentInfoSetting(params:any):  Promise<AgentInfoSetting>{
    return http.post('/consultant/edit',params).then(res => res.data);
  async editAgentInfoSetting(params: any): Promise<AgentInfoSetting> {
    try {
      const response = await http.post('/consultant/edit', params);
      if (response !== null) {
        return response.data;
      } else {
        throw new Error('http.post returned null-like value.');
      }
    } catch (error) {
      console.error('An error occurred while editing agent info setting:', error);
      // 可以在此處處理錯誤或回傳預設值
      throw error;
    }
  }
}
export default new AccountSettingService();