ft_transcendence/frontend/static/js/api/MyProfile.js

19 lines
323 B
JavaScript
Raw Normal View History

2023-12-16 10:42:30 -05:00
import { Profile } from "./profile.js";
class MyProfile extends Profile
{
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;
}
async init()
{
super.init("me");
}
}
export {MyProfile}