// services import APIService from "services/api.service"; class UserService extends APIService { constructor() { super(process.env.NEXT_PUBLIC_API_BASE_URL || "http://localhost:8000"); } async currentUser(): Promise { return this.get("/api/users/me/") .then((response) => response?.data) .catch((error) => { throw error?.response; }); } async updateMe(data: any): Promise { return this.patch("/api/users/me/", data) .then((response) => response?.data) .catch((error) => { throw error?.response?.data; }); } } export default UserService;