import{c as e}from"./_plugin-vue_export-helper-63b51ba4.js";import{N as t}from"./Navbar-4fa05ff0.js";const o=e({components:{Navbar:t},data(){return{error:null,success:!1,passwordData:{currentUsername:"",currentPassword:"",newUsername:"",newPassword:"",confirmNewPassword:""}}},methods:{save(){this.error=null,fetch("/api/password",{method:"POST",body:JSON.stringify(this.passwordData)}).then(r=>{r.status==200?r.json().then(s=>{s.status.toString()==="true"?(this.success=!0,setTimeout(()=>{document.location.reload()},5e3)):this.error=s.error}):this.error="Internal Server Error"})}}});o.mount("#app");
