minor changes password verif
This commit is contained in:
parent
fbb6c0c265
commit
87d5d12a0f
@ -3,6 +3,7 @@ import { ref, computed, onMounted, onBeforeUnmount } from 'vue';
|
|||||||
import { useLayout } from '@/layout/composables/layout';
|
import { useLayout } from '@/layout/composables/layout';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useToast } from 'primevue/usetoast';
|
import { useToast } from 'primevue/usetoast';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
const { onMenuToggle } = useLayout();
|
const { onMenuToggle } = useLayout();
|
||||||
|
|
||||||
@ -47,8 +48,25 @@ onBeforeUnmount(() => {
|
|||||||
unbindOutsideClickListener();
|
unbindOutsideClickListener();
|
||||||
});
|
});
|
||||||
|
|
||||||
const onClickPasswordChange = () => {
|
|
||||||
|
async function onClickPasswordChange() {
|
||||||
submitted.value = true;
|
submitted.value = true;
|
||||||
|
console.log(user.value);
|
||||||
|
var pass =
|
||||||
|
|
||||||
|
{
|
||||||
|
password: user.value.current_password,
|
||||||
|
new_password: user.value.new_password
|
||||||
|
};
|
||||||
|
/* try {
|
||||||
|
const response = await axios.patch(`http://localhost:3001/user/` + user.value.ID, auth.getTokenHeader());
|
||||||
|
if (response.status !== 204) {
|
||||||
|
console.error(response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,6 +90,7 @@ async function onChangeOS() {
|
|||||||
{
|
{
|
||||||
name: os.value.name
|
name: os.value.name
|
||||||
};
|
};
|
||||||
|
console.log(os.value.ID);
|
||||||
try {
|
try {
|
||||||
const response = await axios.patch(`http://localhost:3001/os/` + os.value.ID, changeOS, auth.getTokenHeader());
|
const response = await axios.patch(`http://localhost:3001/os/` + os.value.ID, changeOS, auth.getTokenHeader());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user