
export default defineEventHandler(async (event) => {
    const { public: { apiBase } } = useRuntimeConfig();
     const body = await readBody(event);
     const token = getCookie(event, 'token');

    try {
        const data = await $fetch(`${apiBase}/courseHeadline/complete/${body.id}`, {
            method: 'POST',
            headers: {
               'Accept': 'application/json',
                'Authorization': `Bearer ${token}`
            },
    
        });
console.log(data, 'setce');
        return data;
    } catch (error) {
   
        return error;
    }

})