Bổ sung check lỗi không có quyền khi xóa nôte
This commit is contained in:
parent
4744ac3e23
commit
072d8ccad7
|
|
@ -135,6 +135,13 @@ export const Xdelete = async (url: string, data: any, fnc?: () => void) => {
|
|||
return res.status
|
||||
} catch (error: any) {
|
||||
console.log(error)
|
||||
if (error?.status == false) {
|
||||
notifications.show({
|
||||
title: 'Error',
|
||||
message: error.message ?? _NOTIFICATION_MESS.delete_error,
|
||||
color: 'red',
|
||||
})
|
||||
}
|
||||
if (error.response.status === 422) {
|
||||
const errorMess = error.response.data.message
|
||||
notifications.show({
|
||||
|
|
|
|||
Loading…
Reference in New Issue