42_ft_transcendence/frontend/static/js/api/MyProfile.js

21 lines
335 B
JavaScript

import { Profile } from "./profile.js";
class MyProfile extends Profile
{
constructor (client)
{
super(client, "me")
}
async change_avatar(form_data)
{
let response = await this.client._patch_file(`/api/profiles/me`, form_data);
let response_data = await response.json()
return response_data;
}
}
export {MyProfile}