保誠-保戶業務員媒合平台
Mila
2021-11-16 bb682522ce2e18f7c67f087620134d3aadba559d
PAMapp/assets/ts/api/appointment.ts
@@ -2,11 +2,11 @@
import { AxiosResponse } from 'axios';
// 取得所有預約清單
export function getMyAppointmentList():Promise<AxiosResponse<ClientInfo>> {
export function getMyAppointmentList():Promise<ClientInfo[]> {
    const headers = {
        Authorization: 'Bearer ' + localStorage.getItem('id_token')
    }
    return service.get('/consultant/getMyAppointment', {headers});
    return service.get('/consultant/getMyAppointment', {headers}).then(res => res.data);
}
// 標記為已聯絡
@@ -14,7 +14,9 @@
    const headers = {
        Authorization: 'Bearer ' + localStorage.getItem('id_token')
    }
    // TODO: 跟後端確認,這裡的 API 不應該傳回 void, 而是應該是更新後的資料 - Ben 2021/11/16
    return service.post('/appointment/markAsContacted/'+appointmentId, undefined, {headers})
            .then(res => res.data)
}