Initial commit
This commit is contained in:
20
frontend/dashboard/account/index.js
Normal file
20
frontend/dashboard/account/index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
class AccountManager{
|
||||
constructor(){
|
||||
this.username = document.getElementById("username");
|
||||
this.email = document.getElementById("email");
|
||||
this.fullName = document.getElementById("fullName");
|
||||
|
||||
this.setUserData();
|
||||
}
|
||||
|
||||
async setUserData(){
|
||||
const respone = await fetch("/api/dashboard");
|
||||
this.data = await respone.json();
|
||||
|
||||
this.username.value = this.data.username;
|
||||
this.email.value = this.data.email;
|
||||
this.fullName.value = this.data.fullName;
|
||||
}
|
||||
}
|
||||
|
||||
new AccountManager();
|
||||
Reference in New Issue
Block a user