// @ts-nocheck import axios from "axios"; import { authService } from "./auth"; import { getConfig } from "../config"; const AXIOS_TIMEOUT = 20000; const requestConfig = () => ({ headers: { authorization: `bearer ${authService.jwt}`, "x-maestro-client-id": getConfig().SITE_ID, }, timeout: AXIOS_TIMEOUT, }); export const getUserProfile = async () => { try { const { data } = await axios.get( "https://api.maestro.io/userprofile/v1", requestConfig() ); data.icon = "https://www.bowltv.com" + data.icon; return data; } catch (e) { throw e; } }; export const updateProfile = async (data: any) => { try { await axios.put( "https://api.maestro.io/userprofile/v1", data, requestConfig() ); } catch (e) { throw e; } };