API ลบ
This commit is contained in:
parent
5ac34a4d8d
commit
33db8e63dc
2 changed files with 14 additions and 14 deletions
|
|
@ -9,4 +9,5 @@ export default {
|
||||||
msgNotificate: `${message}/my-notifications`,
|
msgNotificate: `${message}/my-notifications`,
|
||||||
msgInbox: `${message}/my-inboxes`,
|
msgInbox: `${message}/my-inboxes`,
|
||||||
msgId: (id: string) => `${message}/my-notifications/${id}`,
|
msgId: (id: string) => `${message}/my-notifications/${id}`,
|
||||||
|
msgInboxDelete:(id:string) => `${message}/my-inboxes/${id}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -124,20 +124,19 @@ const deleteData = (id:string) => {
|
||||||
//รอ api ลบ
|
//รอ api ลบ
|
||||||
const removeData = async (id:string) => {
|
const removeData = async (id:string) => {
|
||||||
console.log("delete=",id)
|
console.log("delete=",id)
|
||||||
|
showLoader();
|
||||||
// showLoader();
|
await http
|
||||||
// await http
|
.delete(config.API.msgInboxDelete(id))
|
||||||
// .delete(config.API.)
|
.then((res) => {
|
||||||
// .then((res) => {
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
// success($q, "ลบข้อมูลสำเร็จ");
|
})
|
||||||
// })
|
.catch((e) => {
|
||||||
// .catch((e) => {
|
messageError($q, e);
|
||||||
// messageError($q, e);
|
})
|
||||||
// })
|
.finally(() => {
|
||||||
// .finally(() => {
|
getData()
|
||||||
// getData()
|
hideLoader()
|
||||||
// hideLoader()
|
})
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue