31 lines
496 B
JavaScript
31 lines
496 B
JavaScript
import { Client } from "./Client.js";
|
|
import { Profile } from "./Profile.js";
|
|
|
|
class MyProfile extends Profile
|
|
{
|
|
|
|
/**
|
|
* @param {Client} client
|
|
*/
|
|
constructor (client)
|
|
{
|
|
super(client, "../me");
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param {*} form_data
|
|
* @returns {Promise<Object>}
|
|
*/
|
|
async change_avatar(form_data)
|
|
{
|
|
let response = await this.client._patch_file(`/api/profiles/settings`, form_data);
|
|
let response_data = await response.json();
|
|
|
|
return response_data;
|
|
}
|
|
|
|
}
|
|
|
|
export {MyProfile};
|