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