Compare commits
No commits in common. "7e2c29e78b0a692253b4db41cd9cd5aeee948f54" and "0e3b19fcd9d59cc15f67bffd657989806815cf63" have entirely different histories.
7e2c29e78b
...
0e3b19fcd9
@ -8,19 +8,19 @@ class Profile
|
||||
this.user_id = user_id
|
||||
}
|
||||
|
||||
async init(user_id)
|
||||
async init(id)
|
||||
{
|
||||
let response = await this.client._get(`/api/profiles/${user_id}`);
|
||||
let response = await this.client._get(`/api/profiles/${id}`);
|
||||
let response_data = await response.json();
|
||||
|
||||
this.user_id = user_id;
|
||||
this.id = id;
|
||||
this.username = response_data.username;
|
||||
this.avatar_url = response_data.avatar_url;
|
||||
}
|
||||
|
||||
async change_avatar(form_data)
|
||||
{
|
||||
let response = await this.client._patch_file(`/api/profiles/${this.user_id}`, form_data);
|
||||
let response = await this.client._patch_file(`/api/profiles/${this.id}`, form_data);
|
||||
let response_data = await response.json()
|
||||
|
||||
return response_data;
|
||||
|
Loading…
Reference in New Issue
Block a user