fixed uploading pfps
This commit is contained in:
parent
0b1e381284
commit
36fc3fecc2
2 changed files with 6 additions and 6 deletions
|
@ -506,7 +506,7 @@ class Localuser {
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
console.log(this.headers);
|
console.log(this.headers);
|
||||||
reader.onload = () => {
|
reader.onload = () => {
|
||||||
fetch(this.info.api.toString() + "/v9/users/@me", {
|
fetch(this.info.api.toString() + "/users/@me", {
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
|
@ -517,7 +517,7 @@ class Localuser {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
updatepronouns(pronouns) {
|
updatepronouns(pronouns) {
|
||||||
fetch(this.info.api.toString() + "/v9/users/@me/profile", {
|
fetch(this.info.api.toString() + "/users/@me/profile", {
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
|
@ -600,7 +600,7 @@ class Localuser {
|
||||||
newbio = this.value;
|
newbio = this.value;
|
||||||
regen();
|
regen();
|
||||||
}],
|
}],
|
||||||
["button", "update user content:", "submit", function () {
|
["button", "update user content:", "submit", () => {
|
||||||
if (file !== null) {
|
if (file !== null) {
|
||||||
this.updatepfp(file);
|
this.updatepfp(file);
|
||||||
}
|
}
|
||||||
|
|
|
@ -531,7 +531,7 @@ class Localuser{
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
console.log(this.headers);
|
console.log(this.headers);
|
||||||
reader.onload = ()=>{
|
reader.onload = ()=>{
|
||||||
fetch(this.info.api.toString()+"/v9/users/@me",{
|
fetch(this.info.api.toString()+"/users/@me",{
|
||||||
method:"PATCH",
|
method:"PATCH",
|
||||||
headers:this.headers,
|
headers:this.headers,
|
||||||
body:JSON.stringify({
|
body:JSON.stringify({
|
||||||
|
@ -543,7 +543,7 @@ class Localuser{
|
||||||
|
|
||||||
}
|
}
|
||||||
updatepronouns(pronouns:string):void{
|
updatepronouns(pronouns:string):void{
|
||||||
fetch(this.info.api.toString()+"/v9/users/@me/profile",{
|
fetch(this.info.api.toString()+"/users/@me/profile",{
|
||||||
method:"PATCH",
|
method:"PATCH",
|
||||||
headers:this.headers,
|
headers:this.headers,
|
||||||
body:JSON.stringify({
|
body:JSON.stringify({
|
||||||
|
@ -626,7 +626,7 @@ class Localuser{
|
||||||
newbio=this.value;
|
newbio=this.value;
|
||||||
regen();
|
regen();
|
||||||
}],
|
}],
|
||||||
["button","update user content:","submit",function(){
|
["button","update user content:","submit",()=>{
|
||||||
if(file!==null){
|
if(file!==null){
|
||||||
this.updatepfp(file);
|
this.updatepfp(file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue