Fixed: [弱掃] p13.1 Bad use of null-like value
| | |
| | | } |
| | | |
| | | // 顧問瀏覽自己所有的預約單紀錄觸發API |
| | | private viewAllAppointment(): void { |
| | | http.post('/consultant/record/allAppointmentsView').then(); |
| | | private async viewAllAppointment(): Promise<void> { |
| | | try { |
| | | const response = await http.post('/consultant/record/allAppointmentsView'); |
| | | if (response !== null) { |
| | | } else { |
| | | throw new Error('http.post returned null-like value.'); |
| | | } |
| | | } catch (error) { |
| | | console.error('An error occurred while viewing all appointments:', error); |
| | | throw error; |
| | | } |
| | | } |
| | | |
| | | // 讀取預約單時觸發,紀錄讀取預約單時間 |