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