minor changes password verif

This commit is contained in:
Martin Araneda 2023-02-10 22:11:42 -03:00 committed by Chris Cromer
parent fbb6c0c265
commit 87d5d12a0f
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
2 changed files with 20 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import { ref, computed, onMounted, onBeforeUnmount } from 'vue';
import { useLayout } from '@/layout/composables/layout';
import { useRouter } from 'vue-router';
import { useToast } from 'primevue/usetoast';
import axios from 'axios';
const { onMenuToggle } = useLayout();
@ -47,8 +48,25 @@ onBeforeUnmount(() => {
unbindOutsideClickListener();
});
const onClickPasswordChange = () => {
async function onClickPasswordChange() {
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);
} */
}

View File

@ -90,6 +90,7 @@ async function onChangeOS() {
{
name: os.value.name
};
console.log(os.value.ID);
try {
const response = await axios.patch(`http://localhost:3001/os/` + os.value.ID, changeOS, auth.getTokenHeader());