diff --git a/.dist/localuser.js b/.dist/localuser.js index 3df2641..d650a46 100644 --- a/.dist/localuser.js +++ b/.dist/localuser.js @@ -506,7 +506,7 @@ class Localuser { reader.readAsDataURL(file); console.log(this.headers); reader.onload = () => { - fetch(this.info.api.toString() + "/v9/users/@me", { + fetch(this.info.api.toString() + "/users/@me", { method: "PATCH", headers: this.headers, body: JSON.stringify({ @@ -517,7 +517,7 @@ class Localuser { }; } updatepronouns(pronouns) { - fetch(this.info.api.toString() + "/v9/users/@me/profile", { + fetch(this.info.api.toString() + "/users/@me/profile", { method: "PATCH", headers: this.headers, body: JSON.stringify({ @@ -600,7 +600,7 @@ class Localuser { newbio = this.value; regen(); }], - ["button", "update user content:", "submit", function () { + ["button", "update user content:", "submit", () => { if (file !== null) { this.updatepfp(file); } diff --git a/webpage/localuser.ts b/webpage/localuser.ts index 551a978..f3470cb 100644 --- a/webpage/localuser.ts +++ b/webpage/localuser.ts @@ -531,7 +531,7 @@ class Localuser{ reader.readAsDataURL(file); console.log(this.headers); reader.onload = ()=>{ - fetch(this.info.api.toString()+"/v9/users/@me",{ + fetch(this.info.api.toString()+"/users/@me",{ method:"PATCH", headers:this.headers, body:JSON.stringify({ @@ -543,7 +543,7 @@ class Localuser{ } updatepronouns(pronouns:string):void{ - fetch(this.info.api.toString()+"/v9/users/@me/profile",{ + fetch(this.info.api.toString()+"/users/@me/profile",{ method:"PATCH", headers:this.headers, body:JSON.stringify({ @@ -626,7 +626,7 @@ class Localuser{ newbio=this.value; regen(); }], - ["button","update user content:","submit",function(){ + ["button","update user content:","submit",()=>{ if(file!==null){ this.updatepfp(file); }