const editQuiz = async (token, gId, questions, name, thumbnail) => { const request = { method: 'PUT', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}`, }, body: JSON.stringify({ questions: questions, name: name, thumbnail: thumbnail }), } console.log(request.body); const response = await fetch(`http://localhost:5005/admin/quiz/${gId}`, request) return response; } export default { editQuiz }