API ลบ

This commit is contained in:
setthawutttty 2023-09-11 13:41:36 +07:00
parent 5ac34a4d8d
commit 33db8e63dc
2 changed files with 14 additions and 14 deletions

View file

@ -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}`,
};

View file

@ -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()
})
}
</script>