import { ProfilModel } from "@/types";

export const getProfil = async (token : string) => {
    return await fetch('/api/profil', {
        method : 'GET',
        headers : {
            'Accept' : 'application/json',
            'Authorization': `Bearer ${token}`
        }
    });
}

export const saveProfil = async (profil: ProfilModel, token: string) => {
    return await fetch('/api/profil', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Accept': 'application/json',
            'Authorization': `Bearer ${token}`
        },
        body: JSON.stringify(profil)
    });
}
