diff --git a/src/api/00_dashboard/api.message.ts b/src/api/00_dashboard/api.message.ts index e25ce5aff..a157d61fb 100644 --- a/src/api/00_dashboard/api.message.ts +++ b/src/api/00_dashboard/api.message.ts @@ -9,4 +9,5 @@ export default { msgNotificate: `${message}/my-notifications`, msgInbox: `${message}/my-inboxes`, msgId: (id: string) => `${message}/my-notifications/${id}`, + msgInboxDelete:(id:string) => `${message}/my-inboxes/${id}`, }; diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 917097a25..6f573b28d 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -124,20 +124,19 @@ const deleteData = (id:string) => { //รอ api ลบ const removeData = async (id:string) => { console.log("delete=",id) - -// showLoader(); -// await http -// .delete(config.API.) -// .then((res) => { -// success($q, "ลบข้อมูลสำเร็จ"); -// }) -// .catch((e) => { -// messageError($q, e); -// }) -// .finally(() => { -// getData() -// hideLoader() -// }) + showLoader(); +await http +.delete(config.API.msgInboxDelete(id)) +.then((res) => { + success($q, "ลบข้อมูลสำเร็จ"); +}) +.catch((e) => { + messageError($q, e); +}) +.finally(() => { + getData() + hideLoader() +}) }