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`,
|
||||
msgInbox: `${message}/my-inboxes`,
|
||||
msgId: (id: string) => `${message}/my-notifications/${id}`,
|
||||
msgInboxDelete:(id:string) => `${message}/my-inboxes/${id}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue