perbaikan dan sweetalert
This commit is contained in:
@@ -26,8 +26,8 @@ export const useSettingStore = defineStore("SettingStore", () => {
|
||||
const roleMenuById = ref<any>([]);
|
||||
const getRoleMenuById = async (body: Record<string, any>) => {
|
||||
typeUser.value = body;
|
||||
|
||||
await $fetch(`/api/roleMenu/roleMenu`, {
|
||||
|
||||
await $fetch(`/api/setting/getRoleMenu`, {
|
||||
// mode: "no-cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -36,6 +36,7 @@ export const useSettingStore = defineStore("SettingStore", () => {
|
||||
body: JSON.stringify(body),
|
||||
}).then((res) => {
|
||||
roleMenuById.value = res;
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
@@ -85,7 +86,9 @@ export const useSettingStore = defineStore("SettingStore", () => {
|
||||
messages.value.title = 'Akses User Sudah Disimpan'
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
// console.log(err)
|
||||
messages.value.type = 'error'
|
||||
messages.value.title = 'Akses User Tidak Berhasil Disimpan'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user