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